NUML v1.21 - number lines |
Documentation revised 21 Oct 00 - Copyright (c) 1996-2000 by Rune Berg. TextTools Freeware. |
Contents:
Usage | Top || Next |
numl [log logfile] [options] [infile] [to outfile]
See Understanding The Usage Section for details.
Description | Top || Previous || Next |
numl copies infile to outfile, preceeding every line with a line number (1, 2, ...).
If you don't specify infile, numl reads from standard input.
If you don't specify outfile, numl writes to standard output.
If you don't specify logfile, numl writes error messages to standard
error.
Example | Top || Previous || Next |
Consider the example file "mydata.txt", containing four lines:
this is the first line and this is the second and this is the last
The command:
numl mydata.txt
prints:
1 this is the first line 2 and this is the second 3 4 and this is the last
The command:
numl -s0 -nw "-f03 : " mydata.txt
prints:
0000 : this is the first line 0001 : and this is the second 0003 : and this is the last
The command:
numl -cw mydata.txt
prints:
1 this is the first line 2 and this is the second 3 and this is the last
Options | Top || Previous || Next |
numl recognizes the following command line options:
Option | Function |
---|---|
-f[-][0]W[S] | Specify line number format.
[] denotes an optional item.
- : left justify line number. |
-sN | Start numbering with number N. |
-nw | Do not number lines containing only whitespace. |
-ne | Do not number empty lines. |
-cw | Do not count or number lines containing only whitespace. |
-ce | Do not count or number empty lines. |
-v | Print version banner and usage info to standard error (or logfile, if given), then exit. |
An empty line is a line containing only newline.
Return Codes | Top || Previous || Next |
numl returns with one of the following codes ("error levels"):
Code | Meaning |
---|---|
0 | Success |
102 | Incorrect/missing command line arguments |
104 | Error opening file |
105 | I/O Error |
107 | File name clash |
For more details, see TextTools General Features.
Version History | Top || Previous |
These are the released versions of numl:
Version | Date | Changes |
---|---|---|
1.00 | 16-Nov-96 | n/a |
1.10 | 13-Jul-97 |
|
1.20 | 2-Jan-99 |
|
1.21 | 21-Oct-00 |
|
End of document |