|
| From: | Pierre Gaston |
| Subject: | Re: [Help-bash] ${var//!([[:class:]])} removing characters of the [:class:] |
| Date: | Sun, 27 Jan 2013 10:27:03 +0200 |
> But I don't know how to explain this result:
>
> $ echo ${v//!(foobar)/xxx}
> xxxxxx
!(foobar) first matches "fooba" (the longest string not matching
foobar) and replaces it with xxx
It then matches the r and replaces it by xxx
and yeah !(pattern) is not the most intuitive glob
| [Prev in Thread] | Current Thread | [Next in Thread] |