stderr & csh
Rebecca J. Oakes
skeeve at eng.umd.edu
Thu Dec 7 13:57:16 AEST 1989
This question may sound DUMB, but please read it!!!!!!
Using CSH, how do you redirect ONLY stderr? Before you all say
"idiot, just use >&", try this program.......
#include "stdio.h"
/* to compile: cc -o erronly erronly.c */
/* to run: erronly >& outfile */
main()
{
fprintf(stderr, "I know you won't believe me ");
fprintf(stdout, "until you read this file!!\n");
}
As stated in THE UNIX C SHELL FIELD GUIDE, written by Gail Anderson &
Paul Anderson, on page 64, ">& also redirects the standard output".
--
//\ | _
\\ | /^\ - Cyber Spud
\// keeve at wam.umd.edu | \_/ -- The Augmented Potatoe
|
"Life is a series of rude awakenings." - R. V. Winkle
More information about the Comp.unix.questions
mailing list