I'm sorry, but my diagnosis wasn't correct. The "op( )"-type file
patterns simply doesn't seems to work properly in functions:
#!/bin/sh
function test
{
set -A arr $1
print [EMAIL PROTECTED]
print $1
}
test "*"
test "@(test.sh)"
$ ls
test.sh
$ ./test.sh
test.sh
test.sh
@(test.sh)
@(test.sh)
On 03/08/05, Andreas Kahari <[EMAIL PROTECTED]> wrote:
> See sh(1), under "Command execution":
>
> [...] Just to confuse things, if the posix option is turned off (see
> the set command below), some special commands are very special in that
> no field splitting, file globbing, nor tilde expansion is performed on
> arguments that look like assignments.
>
>
> Andreas
>
> On 03/08/05, Dave Anderson <[EMAIL PROTECTED]> wrote:
> > Something's screwy here, using the 'set -A' command in /bin/sh on
> > 3.7-release. AFAICT the complicated file-match expression should (in
> > this case) produce the same results as the simple one, but it doesn't
> > seem to match at all when used in this script -- but does produce the
> > expected result when cut-and-pasted to a command line.
[cut]
--
Andreas Kahari
PGP: 1024D/C2E163CB