dempsey@handel.colostate.edu. (Steve Dempsey) (10/29/88)
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<stdio.h> 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