how to use tee command to redirect the output to two different commands in tcsh shell

381 views Asked by At

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?

0

There are 0 answers