Hello
I'm writing script in awk that reverse order the fields of every line in file.
My script have problem with spaces - if there is more spaces between fields
in line of file - my script erase them .
I want my script work like command "tac" - how to change it ?
#!/bin/sh
file=$1
awk '
{
for(i=NF;i>0;i--)
printf("%s " , $i); printf("\n")
} ' $file