home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ferkel.ucsb.edu!taco!gatech!destroyer!gumby!yale!yale.edu!ira.uka.de!Germany.EU.net!pki-nbg!pki-nbg.philips.de!ln_smr
- From: ln_smr@pki-nbg.philips.de (Stephen Riehm)
- Newsgroups: comp.unix.shell
- Subject: Re: >& redirects stderr AND stdout.
- Message-ID: <ln_smr.728058390@pki-nbg.philips.de>
- Date: 26 Jan 93 14:26:30 GMT
- References: <aet.727670022@munagin> <9302422.23216@mulga.cs.mu.OZ.AU>
- Sender: news@pki-nbg.philips.de
- Reply-To: ln_smr@pki-nbg.philips.de
- Lines: 45
-
- fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) writes:
-
- >aet@mullian.ee.mu.OZ.AU (bert thompson) writes:
-
- >>hi!
- >>
- >>i would like to know if there is a way to redirect ONLY stderr
- >>rather than both stderr and stdout in csh (or in sh).
-
- >It's not possible in csh.
-
- yeah 'tis! try:
-
- ( some_program > /dev/null ) >& error.file
-
- OK its a bit of a kluge, but you could also do the following to get
- stdout on your stdout:
-
- ( some_program > /tmp/file ) >& error.file ; {cat,more,less} /tmp/file
-
- >[irrelevent stuff narked], but sh is a much better
- >language for writing scripts in.
-
- This is definitely true. csh (or better, tcsh) has a great UI, but for
- real scripts, /bin/sh is:
- a> supported on all unix platforms
- b> almost standardised accross platforms
- c> much more flexible
- d> quicker (startup time at least)
- csh on the other hand is;
- a> not supported on all platforms
- b> not standardised (there are many different flavours)
- c> limited in programming structure (no procedures for a start)
-
- catchya
-
- --------------------------------------------------------------------
- Stephen Riehm Configuration Management _-_|\
- ln_smr@pki-nbg.philips.de Philips Kommunikations Industrie / \
- Work: +49 911 526 2975 Nu"rnberg, Germany \_.-.!/
- Fax: +49 911 526 3678 "I was there, now I am here!" v
- "My company speaks another language, I CAN'T speak on its behalf"
- PS: You may think I am joking, I can't speak the language that well so
- PLEASE DON'T REPLY IN GERMAN!
- - thanks -
-