bug-bash
[Top][All Lists]
Advanced

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

Re: Using unset to destroy array elements doesn't work with 'nullglob'


From: Francis Moreau
Subject: Re: Using unset to destroy array elements doesn't work with 'nullglob' set
Date: Fri, 5 Jun 2009 18:08:29 +0200

On Fri, Jun 5, 2009 at 6:05 PM, Greg Wooledge <wooledg@eeg.ccf.org> wrote:
> On Fri, Jun 05, 2009 at 08:35:15AM -0700, Francis Moreau wrote:
>> unset foo[0]
>
> This is a problem in your script, unfortunately.  Even without nullglob,
> this can still fail if you happen to have a file named foo0 in your
> current working directory, which would be matched as a glob.
>
> For total safety, you must quote it:
>
> unset 'foo[0]'
>

oh yes you're right !

thanks


-- 
Francis




reply via email to

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