in reply to Line numbering
Update: I missed to skip the empty lines:perl -pe '$_ = "$.: $_"' your_file >your_new_file
perl -pe '$_ = /\S/ ? ++$q .": $_" : ""' in >out
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Line numbering
by Jasper (Chaplain) on Oct 04, 2004 at 12:43 UTC |