From owner-freebsd-hackers Wed Dec 11 1:40:18 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB87137B401 for ; Wed, 11 Dec 2002 01:40:16 -0800 (PST) Received: from pcwin002.win.tue.nl (pcwin002.win.tue.nl [131.155.71.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id 61F0243EC5 for ; Wed, 11 Dec 2002 01:40:15 -0800 (PST) (envelope-from stijn@pcwin002.win.tue.nl) Received: from pcwin002.win.tue.nl (localhost [127.0.0.1]) by pcwin002.win.tue.nl (8.12.6/8.12.6) with ESMTP id gBB9e4lv053374; Wed, 11 Dec 2002 10:40:04 +0100 (CET) (envelope-from stijn@pcwin002.win.tue.nl) Received: (from stijn@localhost) by pcwin002.win.tue.nl (8.12.6/8.12.6/Submit) id gBB9e4nC053373; Wed, 11 Dec 2002 10:40:04 +0100 (CET) Date: Wed, 11 Dec 2002 10:40:04 +0100 From: Stijn Hoop To: Peter Pentchev Cc: Lamont Granquist , Dmitry Morozovsky , freebsd-hackers@freebsd.org Subject: Re: CVS_LOCAL_BRANCH_NUM? Message-ID: <20021211094004.GC52865@pcwin002.win.tue.nl> References: <20021210201135.H10798-100000@woozle.rinet.ru> <20021210115422.T3061-100000@coredump.scriptkiddie.org> <20021211085954.GB371@straylight.oblivion.bg> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1SQmhf2mF2YjsYvc" Content-Disposition: inline In-Reply-To: <20021211085954.GB371@straylight.oblivion.bg> User-Agent: Mutt/1.4i X-Bright-Idea: Let's abolish HTML mail! Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --1SQmhf2mF2YjsYvc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 param= eters > > > contain spaces (bad practice in filenames, yeah, but don't make yours= elf > > > another one PITA you can avoid ;-P ) > >=20 > > got it. >=20 > 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 par= am- eter expands as a separate argument. If there are no position= al parameters, the expansion of @ generates zero arguments, even when @ is double-quoted. What this basically means, for examp= le, 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. --Stijn --=20 Help Wanted: Telepath. You know where to apply. --1SQmhf2mF2YjsYvc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE99wf0Y3r/tLQmfWcRAjhmAJ96nAy17A64ghe7ImDgVAKp5qULYwCgoPle Sy1QeXfxA2xdGlchs0wWrcY= =KsS1 -----END PGP SIGNATURE----- --1SQmhf2mF2YjsYvc-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message