Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!swrinde!zaphod.mps.ohio-state.edu!think!ames!haven!mimsy!mojo!skeeve From: skeeve@eng.umd.edu (Rebecca J. Oakes) Newsgroups: comp.unix.questions Subject: stderr & csh Message-ID: <1989Dec7.025716.2507@eng.umd.edu> Date: 7 Dec 89 02:57:16 GMT Sender: news@eng.umd.edu (The News System) Reply-To: skeeve@eng.umd.edu Distribution: usa Organization: Merriversity of Uniland, College Purgatory Lines: 24 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@wam.umd.edu | \_/ -- The Augmented Potatoe | "Life is a series of rude awakenings." - R. V. Winkle