bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Array Elements with Spaces


From: Michael Potter
Subject: Re: Array Elements with Spaces
Date: Sat, 10 Nov 2007 12:56:35 -0600

Thanks,

That fixed it.

For the benefit of others...
I ran my test program on a couple different versions of bash (including 2.x)
and It seems that this behavior (combination of quotes and * versus @)
changes based on the version of bash, and not just between 2.x and 3.x.  I
did not do an exhaustive test because this solution will work for me.

-- 
potter

On Nov 10, 2007 12:27 PM, Andreas Schwab <schwab@suse.de> wrote:

> "Michael Potter" <pottmi@gmail.com> writes:
>
> > countparms ${Arguments[*]}
>
> Use "${Arguments[@]}" instead (including the quotes).  See node Arrays
> in the Bash docs.
>
> Andreas.
>
> --
> Andreas Schwab, SuSE Labs, schwab@suse.de
> SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
> PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
> "And now for something completely different."
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]