I'm not sure I understand the NF variable in awk.
My example file (test) contains one line:
1 2 3 4 5
The following works as expected:
awk '{print $1,$NF}' test
1 5
But the next example does not (i.e. the reverse):
awk '{print $NF,$1}' test
1
What am I missing here? I can print $NF by itself, or after $1, but not before.