C shell question.
Jay M. Libove
root at libove.UUCP
Wed Feb 15 05:18:17 AEST 1989
>From article <6295 at phoenix.Princeton.EDU>, by prnott at phoenix.Princeton.EDU (Prabhu R Nott):
>
> I hope this is the right news-group for this question -
> Could someone tell me how I can redirect output from standard error
> to a file or device? In the Bourne shell, this can be achieved by
> command 2>filename, but this doesn't work in the C shell.
> Does anyone know what the syntax is? Thanks in advance.
No doubt this should be in the Frequently Asked Questions section of
the usenet introduction documents...
The C shell lacks the ability of the Bourne shell to in one simply command
redirect two types of output to two different places, but it provides
it in a grosser (word?) way:
c-shell% (command > stdout.file) >& stderr.file
So that all standard output goes to stdout.file, and error output goes
outside of the subshell in which command was executed, and is caught
by forcing all output making out of that shell in to stderr.file.
--
Jay Libove jl42 at andrew.cmu.edu, libove at cs.cmu.edu,
5731 Centre Ave, Apt 3 gateway.sei.cmu.edu!libove!libove, jl42 at andrew.BITnet,
Pittsburgh, PA 15206 jl42 at drycas.BITnet, psuvax1!pitt!darth!libove!libove,
(412) 362-8983 or uunet!nfsun!libove!libove
More information about the Comp.unix.questions
mailing list