Update: I missed to skip the empty lines:perl -pe '$_ = "$.: $_"' your_file >your_new_file
perl -pe '$_ = /\S/ ? ++$q .": $_" : ""' in >out
In reply to Re: Line numbering
by borisz
in thread Line numbering
by useless
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |