How does one redirect just stderr under the C Shell?
Tom Christiansen
tchrist at convex.COM
Thu May 9 01:47:38 AEST 1991
>From the keyboard of rwl at ee.umr.edu (Wayne Little):
:*BUT* after all these years I still can't figure out how to redirect
:*just* stderr independently of stdout under the C Shell.
:I'm at a loss under the C Shell.
In general, it can't be done.
Now, I'm sure someone will suggest
( foo > foo.stdout ) >& foo.stderr
but that's not right: stdout is mangled. Someone else
will suggest
( foo > /dev/tty ) >& foo.stderr
but that's not right, as stdout is no longer going where it
had been going.
If your system should support /dev/fd pseudo-devices, this
ought to work:
( foo > /dev/stdout ) >& foo.stderr
But few of us have that feature on our systems.
--tom
--
Tom Christiansen tchrist at convex.com convex!tchrist
"So much mail, so little time."
More information about the Comp.unix.wizards
mailing list