I am new in awk and I do not know if it is possible to write an awk script that does this:
I have hundred of data files that I have to sort. For each one I use the following one-liner:
awk 'ORS=NR%3?" ":"\n" ' file1.tex > file1_sorted.tex awk 'ORS=NR%3?" ":"\n" ' file2.tex > file2_sorted.tex ...
and I get the output I need. However I would like to have an script to automate this action, taking each file, applying the action and writing the corresponding sorted file.
I would appreciate your help!