Subject: bug#20006: Bash-specific performance by avoiding sed

From: Eric Blake <[email-masked]>
Date: Mon, 5 Oct 2015 09:16:30 -0600

On 10/05/2015 01:47 AM, Pavel Raiskup wrote:

> 
> Hmm, one might-be-a-problem with this (catched by testsuite), when you

s/catched/caught/

> We would like to have an output \"*\".  I'm not aware of portable way
> how to disable wildcard expansion in shell, and autoconf 'Shellology'
> section haven't helped me.  In particular, the problem is here:

It is portable to use 'set +f' to disable wildcard globbing, then 'set
-f' to turn them back on.  (POSIX requires it).

> 
>   x='a"[a-z]*"c'
>   IFS='"'
>   for i in $x; do # Here we wan't to disable wildcard expansion

s/wan't/want/

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