How can i do this using awk?
Example -
awk '{split($1,A,"."); print A[-1], $1, $2, $3, $4}'
Sample input and output.
Input
123 456 abc.def.ghi 789
321 654 qaz.wsx.edc.rfv 987
Output
ghi 123 456 abc.def.ghi 789
rfv 321 654 qaz.wsx.edc.rfv 987