I am trying to sort the output of an awk script which contains 2 lines of header information (which should not be sorted). For that I am using tee command in tcsh shell as shown below
awk -f scr.awk tmp.txt | tee >(head -n 2 > tm) >(tail -n +3 | sort -k1,1 >> tm)
The above code is not working; it is giving the error Missing name for redirect. How can I fix this?