Re: Package maintainer script policy.
Manoj Srivastava <srivasta@datasync.com> wrote:
> % exec some-prog "$@"
> Now, suppose some-prog counts its arguments (we don't know, in
> genral, do we?), and does different things when there are no
> arguments (go into interactive mode, for example).
> Well, if $@ is empty, "$@" expands to ""; which is not the
> same as no arguments!! So there is no way to pass the fact that ther
> were no arguments, unless,
Wrong. Quoting from SUS,
@ Expands to the positional parameters, starting from one. When the
expansion occurs within double-quotes, and where field splitting (see
Field Splitting ) is performed, each positional parameter expands as a
separate field, with the provision that the expansion of the first
parameter is still joined with the beginning part of the original word
(assuming that the expanded parameter was embedded within a word), and
the expansion of the last parameter is still joined with the last part
of the original word. If there are no positional parameters, the
expansion of "@" generates zero fields, even when "@" is double-quoted.
--
Debian GNU/Linux 2.0 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: