[glug-t] One Day One GNU/Linux Command (NL)
- From: Bharathi Subramanian <sbharathi@xxxxxxxxxxxxx>
- To: GNU/Linux User Group of TCE <glugot@xxxxxxxxxxxxx>, VEC-FOSS <vecfoss@xxxxxxxxxxxxxxxx>, GNU/Linux Users Group - Trichy <glug_t@xxxxxxxxxxxxx>
- Date: Fri, 25 Apr 2008 10:14:15 +0530 (IST)
One Day One GNU/Linux Command
=============================
nl - Number lines of files
Summary:
Write each FILE to stdout, with line numbers added. With No FILE
or -, read from stdin.
Examples :
$ nl myfile -- Writes all non-empty lines with number.
$ nl -ba myfile -- Number all lines.
$ nl -ba -l2 myfile -- Count 2 empty line as 1 and display
$ nl -nln myfile -- Numbers are left justified.
$ nl -nrz myfile -- Numbers are right justified and leading zeros
$ nl -w2 myfile -- Uses 2 column for the line number.
$ nl -s"> " myfile -- Insert "> " in between number and line.
$ nl -bp"^T" myfile -- Number the lines start with char 'T'.
$ ls | nl -- ls Output with line numbers
Read: man nl
HTH :)
--
Bharathi S
---------------------------------------------------------------
To unsubscribe send a mail to glug_t-request@xxxxxxxxxxxxx with
'unsubscribe' as subject.
Website: http://glugt.linuxisle.com
- Follow-Ups:
- [glug-t] Re: One Day One GNU/Linux Command (NL)
- From: Senthil Kumaran S
Other related posts:
- » [glug-t] One Day One GNU/Linux Command (NL)
- » [glug-t] Re: One Day One GNU/Linux Command (NL)
- [glug-t] Re: One Day One GNU/Linux Command (NL)
- From: Senthil Kumaran S