I have a file that looks like this:
1 2 AA 4 5 AA BB 7 8 AA BB CC 10 11 AA BB CC DD
I use awk to retrieve only each nth line, where n=3 .
>>awk 'NR%3==0' /input/file_foo >> output/file_foobar
The output is displayed in one line as follows:
AA AA BB AA BB CC AA BB CC DD
..... etc.
I want it to display as:
AA AA BB AA BB CC AA BB CC DD
I tried using \n , printf with \n and so on, but it does not work as I expect. Please inform.
awk
mane
source share