a.out 1> file.out 2> file.err in csh?
Sun NCAA
matthew at sunpix.UUCP
Thu Oct 27 00:12:14 AEST 1988
> Hate to be this cluelessly stupid, but something's been bugging the
> hell out of me- how do you do the Bourne :
>
> a.out 1> file.stdout 2> file.stderr
>
> in the csh? ("a.out > file.stdout >& file.stderr" doesn't cut it,
> since ">&" is defined to be BOTH stdout and stderr, hence is an
> ambiguous redirection)
>
Check out this little clipping from my online man page.
The only way to direct the standard output and standard
error separately is by invoking a subshell, as follows:
tutorial% (command > outfile) >& errorfile
Although robust enough for general use, adventures into the
esoteric periphery of the C-Shell may reveal unexpected
quirks.
--
Matthew Lee Stier (919) 469-8300|
Sun Microsystems --- RTP, NC 27560| "Wisconsin Escapee"
uucp: {sun, rti}!sunpix!matthew |
More information about the Comp.unix.wizards
mailing list