Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ncar!boulder!ccncsu!handel.colostate.edu.!dempsey From: dempsey@handel.colostate.edu. (Steve Dempsey) Newsgroups: comp.unix.wizards Subject: Re^2: a.out 1> file.out 2> file.err in csh? Keywords: csh stdout stderr redirect Message-ID: <519@ccncsu.ColoState.EDU> Date: 29 Oct 88 02:16:53 GMT References: <7132@cslb.CSL.SRI.COM> Sender: news@ccncsu.ColoState.EDU Reply-To: dempsey@handel.colostate.edu..UUCP (Steve Dempsey) Organization: Colorado State University, Ft. Collins CO 80523 Lines: 38 In article <7132@cslb.CSL.SRI.COM> aida@csl.sri.com (Hitoshi Aida) writes: >Also, is there any good way to send message to stderr in csh? >I mean just like > echo "$1 not found" >&2 >in sh. Not that I know of. But if it's an interactive script, use echo "whatever" >> /dev/tty Otherwise, I use a little C program like this: ------------------------------------------------------------ /* stderr.c : direct stdin to stderr */ /* off the top of my head; did not compile & run this */ #include main() { register char c; while((c=getchar())!=EOF) putc(c,stderr); } ------------------------------------------------------------ Then the shell part says echo "whatever" | stderr If anyone knows how to do this cleanly within csh, I too would like to know. >Hitoshi AIDA >Computer Science Lab, SRI International /\ \Steve Dempsey, Center For \steved@longs.LANCE.ColoState.Edu \/ _|/ _ _\Computer Assisted Engineering\dempsey@handel.CS.ColoState.Edu /\ | (_) | |_(_)\Colorado State University \...!ncar!handel!dempsey /_/_/(_/\_/ V \_ \Fort Collins, CO 80523 \(303)-491-0630