How to display the fields in a text file in reverse order?

awk ‘BEGIN {ORS=””} { for(i=NF;i>0;i–) print $i,” “; print “\n”}’ filename

Category: UNIX Interview Questions.