You're replying to a comment by Peter Krumins.

July 31, 2009, 22:49

James, oh, I see. Here are solutions for that:

perl -pe '$_ = "$. $_" if /regex/'

Or if you don't want to print lines that did not match at all, then:

perl -ne 'print "$. $_" if /regex/'

I will modify the article to include them, thanks for the comment!

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "halflife3_150": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.