C shell question.

Eirik Fuller eirik at lurch.Stanford.EDU
Tue Feb 14 05:53:46 AEST 1989


In article <2904 at rtmvax.UUCP>, mjg at 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.



More information about the Comp.unix.questions mailing list