duplicating file descriptor in Bourne shell -- Posted by inturi on Wednesday, January 23 2008
In the Bourne shell, you can open or dup arbitrary file descriptors. For example,
exec 2>errs.out
means that from then on, stderr goes into errs file.
Or what if you just want to throw away stderr and leave stdout alone? Pretty simple operation, eh?