Is it possible to do something like this:
$ cat foo.txt 1 2 3 4 foo bar baz hello world $ awk \'{ for(i in $){ print $[i]; } }\' foo.txt 1 2 3 4 foo bar baz
I'd use sed:
sed 's/\ /\n/g' foo.txt