Hi everybody:
Could anybody tell me how I can print from a file a selected rows with awk. In my case I only want print in another file all the rows from NR=8 to NR=2459 and the increment each 8 times.
I tried to this:
awk '{for (i=8; i=2459; i+=8); NR==i}' file1 > file2
and
awk 'NR%8==0 && NR<=2459' file1 > file2
But doesn't work.
Thanks in advance.
Could anybody tell me how I can print from a file a selected rows with awk. In my case I only want print in another file all the rows from NR=8 to NR=2459 and the increment each 8 times.
I tried to this:
awk '{for (i=8; i=2459; i+=8); NR==i}' file1 > file2
and
awk 'NR%8==0 && NR<=2459' file1 > file2
But doesn't work.
Thanks in advance.