paulobrads
Programmer
I have an awk command similar to this:
So as to print the final 3 words of the string - however print puts a line break after each one so I get:
How do I suppress this so I get it all on one line?
Cheers.
Code:
echo this is a hello world | awk '{ for(i=3; i<=NF; i++){ print $i }}'
So as to print the final 3 words of the string - however print puts a line break after each one so I get:
Code:
a
hello
world
How do I suppress this so I get it all on one line?
Cheers.