//View Tip #148
Similar Tips
» Print until no match
» Find and replace on specific files
» Stream YouTube videos directly to your media player
» Mass-renaming files
» Duplicate directory tree


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


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
Or simply and shortest:

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

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

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit