Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!uakari.primate.wisc.edu!xanth!xanth.cs.odu.edu!scott From: scott@cs.odu.edu (Scott Yelich) Newsgroups: comp.unix.wizards Subject: Re: csh programming problem Message-ID: Date: 16 Mar 90 00:04:47 GMT References: <53408@bbn.COM> <1990Mar15.042505.17020@athena.mit.edu> Sender: news@cs.odu.edu Organization: Old Dominion University, Norfolk, VA Lines: 34 In-reply-to: jik@athena.mit.edu's message of 15 Mar 90 04:25:05 GMT >(Scott Yelich) >writes: >>>I am trying to write a shell script that takes several arguments and >>>passes them to child processes, i.e. >>>#!/bin/csh >>>... >>foo "$@" >>bar "$@" > Notice that he was talking about a *C shell* script. > $@ is a *bourne shell* construct. It doesn't work in the C shell. Well, if I was making a shell script that JUST passed already passed values to sub shells.... I would write it in sh because there is a facility which makes this function extremely easy. See his previous message for the problems csh causes.... But, if he REALLY likes csh... perhaps? ------------------------------------------------------------------------------ eval f `repeat $#argv eval 'echo -n \"$1\"\ ; shift'` ------------------------------------------------------------------------------ However, I still prefer ``foo "$@"'' for its simplicity. > P.S. Any particular reason why your signature contained almost an entire > page full of blank lines? Did it? What about this one? Are you sure? -- ----------------------------------------------------------------------------- Scott D. Yelich scott@cs.odu.edu [128.82.8.1] After he pushed me off the cliff, he asked me, as I fell, ``Why'd you jump?'' -----------------------------------------------------------------------------