-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Jim Meyering on 4/30/2008 4:19 AM:
|> - $(find ${*-*} -name Entries -print) /dev/null;
|> + $(find ${*:-*} -name Entries -print) /dev/null;
|
| Thanks for reporting that.
| Note though that POSIX appears to require the behavior that bash exhibits,
| so calling this a bashism doesn't seem right. However, in the spec,
| just beneath the part that talks about ${parameter-word} there are escape
| clauses for e.g., ${#parameter} and ${parameter%word} etc.:
|
| If parameter is '*' or '@', the result of the expansion is
unspecified.
|
| but there is no such exemption for the ${parameter-word} syntax.
I think POSIX is ambiguous here. For the ${a:-b} (and ${a-b}) form, it
only states that if the parameter is null/unset, use the substitute; but
it can be argued that * and @ are _always_ set. Maybe it's worth asking
the Austin group. But Jim's workaround looked better anyway.
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9(a)byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at
home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iEYEARECAAYFAkgYYJ0ACgkQ84KuGfSFAYDEUwCfVbpDefbEG7jDvE1xb9QN3YQF
d78AoK0uSOptJ23xiRSAmtFEXyl4IqhY
=WMpq
-----END PGP SIGNATURE-----