bug-bash
[Top][All Lists]
Advanced

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

Re: How to create bash-pattern to exclude a matching param in param expa


From: Eric Blake
Subject: Re: How to create bash-pattern to exclude a matching param in param expansion&matching?
Date: Mon, 28 Oct 2013 16:47:14 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

On 10/28/2013 04:41 PM, Linda Walsh wrote:
> On 10/28/2013 3:35 PM, Linda Walsh wrote:
>> ls !($(echo *+(-IGN-)*|tr " " "|"))
>>
>> I tried the above in a dir that has 2 files w/the pattern, and
>> 532 w/o, and it worked, but how much of that was 'luck'?
> ---
> Slight improvement -- but still not a direct bash pattern:
> 
> !($(printf "%s|" *+(-IGN-)*))

What's wrong with:

!(*-IGN-*)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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