Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!angelo!lindy!eirik@lurch.Stanford.EDU From: eirik@lurch.Stanford.EDU (Eirik Fuller) Newsgroups: comp.unix.questions Subject: Re: C shell question. Summary: use sh Keywords: standard error, output redirection. Message-ID: <2040@lindy.Stanford.EDU> Date: 13 Feb 89 19:53:46 GMT References: <6295@phoenix.Princeton.EDU> <2904@rtmvax.UUCP> Sender: news@lindy.Stanford.EDU Organization: InterViews/Allegro group, Stanford University Lines: 23 In-reply-to: mjg@rtmvax.UUCP (Mike Gogulski) In article <2904@rtmvax.UUCP>, mjg@rtmvax (Mike Gogulski) writes: > ... [discussion of redirection of stderr] >% ( command > stdout ) >& stderr > >This, however, is kinda yucky. You might wish to look at Bob >Glickstein's "redir" program, recently posted to comp.sources.misc, >which allows redirection much like sh does. Tell me, why not just do something like the following? sh -c 'command >stdout 2>stderr' In fact, my first reaction to the redir program was that it could have been a sh script ... I frequently find myself coping with csh annoyances by wrapping my command line with sh -c '[cmdline goes here]'. I tend to do loops as sh -c 'for f in *; do whatever; done' because I never did like foreach.