You're viewing a comment by Dr. Stefan Gruenwald and its responses.

March 27, 2011, 04:08

Here is the code that should work for you:

for (( n=1; n<21; n++ )); do awk -v n=$n
'NR==a+(122*n)||NR==b+(122*n)||NR==c+(122*n)'
a=506 b=590 c=600 text1.log >>out.txt; done

This should be all in one line (a true "oneliner').

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

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

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