On Wed, Dec 11, 2002 at 10:40:04AM +0100, Stijn Hoop wrote:
> On Wed, Dec 11, 2002 at 10:59:55AM +0200, Peter Pentchev wrote:
> > On Tue, Dec 10, 2002 at 11:56:26AM -0800, Lamont Granquist wrote:
> > > On Tue, 10 Dec 2002, Dmitry Morozovsky wrote:
> > > > Please note quotes explicitly, "$@" is really needed where your parameters
> > > > contain spaces (bad practice in filenames, yeah, but don't make yourself
> > > > another one PITA you can avoid ;-P )
> > > 
> > > got it.
> > 
> > Mmm.. I am not really sure if we need quotes in this particular case.
> > In my experience, the CVS invocation in the server or pserver case
> > almost always has more than one argument (at the very least, the
> > 'server' or 'pserver' keyword and one 'allow-root' option).  The quotes
> > around "$@" would make the whole param string be passed as a single
> > parameter to the "real" CVS binary, which might not be quite the desired
> > result...
> 
> No, that's not the behaviour with /bin/sh, from the man page:
> 
>      @       Expands to the positional parameters, starting from one.  When
>              the expansion occurs within double-quotes, each positional param-
>              eter expands as a separate argument.  If there are no positional
>              parameters, the expansion of @ generates zero arguments, even
>              when @ is double-quoted.  What this basically means, for example,
>              is if $1 is ``abc'' and $2 is ``def ghi'', then "$@" expands to
>              the two arguments:
> 
>                    "abc"   "def ghi"
> 
> I think "$@" (with the quotes) is ok.

Oops.  Thanks for the clarification.  Never had to deal with $@ before,
actually.

/me crawls back into his hole.

G'luck,
Peter

-- 
Peter Pentchev  [EMAIL PROTECTED]        [EMAIL PROTECTED]
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
No language can express every thought unambiguously, least of all this one.

Attachment: msg38617/pgp00000.pgp
Description: PGP signature

Reply via email to