Hi all,
1. 2> and 2>> may be used despite the usage of > or |, as they are aimed at a different file descriptor.
2. If you wonder whether some sequence is good or not use the shell to check is, e.g. if you want to see whether:
# ./a.out ls "2>" errfile "<" infile ">" outfile
is legitimate then execute the following in the shell and see what happens:
# ls 2> errfile < infile > outfile
Just FYI, it is legitimate.
Best,
Moti