//View Tip #148
Similar Tips
» Convert permissions to octal
» Find and replace on specific files
» Command examples from shell-fu
» Print part of a file
» Using sed across multiple lines

 

Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow



Comments 

Add your comment

Comments are currently disabled
sed = filename | sed 'N;s/\n/\t/' > filename.numbered

to number a file and make a new one? Are you serious?


cat -n filename > filename.numbered
Posted 2008-10-02 16:38:45
inigo
Or simply and shortest:

 cat -n file
Posted 2009-01-01 19:52:41
Aaron
Or even shorter:

nl file
Posted 2010-06-04 07:05:27

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit