You're viewing a comment by Go_Obama and its responses.

Go_Obama Permalink
September 28, 2008, 21:16

Thanks ! many are exactly what I been lokking for:

Question re #6
So say if I want a new file from the concatenate of
foo.log0,
foo.log1,
foo.log2 (increaing date)

and number all lines of all log files together,

This is the right command ?

awk '{ print NR "\t" $0 }' foo.log* > foo.txt

or should I do:

awk '{ print NR "\t" $0 }' foo.log0 foo.log1 foo.log2 > foo.txt

thanks

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

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

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