[Beowulf] Re: Religious wars

Perry E. Metzger perry at piermont.com
Mon Jul 21 10:23:27 PDT 2008

stephen mulcahy <smulcahy at aplpi.com> writes:
> Peter St. John wrote:
>> Line numbers are super convenient for peer-review, so humans can
>> refer to lines. I've written C programs just to preprend every line
>> with a consequtive integer.
>> Peter
> cat -n is your friend.

and if it didn't exist, the corresponding awk program is:

  awk '{printf "%d %s\n", FNR, $0}'

and Unix has about 10 other trivial ways to do this. (That's probably
not even the simplest awk program, but I'm lazy today.)


More information about the Beowulf mailing list