Re: Package maintainer script policy.
In article <[🔎] 19980804151005.03410@test.legislate.com>,
Raul Miller <rdm@test.legislate.com> wrote:
>Manoj Srivastava <srivasta@datasync.com> wrote:
>> Well, if $@ is empty, "$@" expands to "";
>
>Is this mandated by the posix standard?
The last time I read the standard for shell & utilities completely (which
is admittedly a few years ago) I was implementing a Posix shell myself.
And "$@" should expand to _nothing_ if $@ is empty, not "".
>If so, this is an example of
>how debian's current /bin/sh is not posix. If not, then this is
>just plain bogus.
Test with:
#! /bin/bash
if [ "$LOOP" = 1 ]
then
echo "\$@: $@, \$#: $#"
exit 0
fi
export LOOP=1
$0 "$@"
Results:
bash: $@: , $#: 0
ash : $@: , $#: 0
zsh : $@: , $#: 0
Mike.
--
Miquel van Smoorenburg | Our vision is to speed up time,
miquels@cistron.nl | eventually eliminating it. <*>
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: