[PATCH] Don't use Bash-specific ${parameter/pattern/string} expansion

Patrick 'P. J.' McDermott pj+sourceware-ml@pehjota.net
Tue Sep 10 16:58:00 GMT 2013


On 2013-09-10 11:24, Mike Frysinger wrote:
> On Sunday 08 September 2013 16:18:53 Patrick 'P. J.' McDermott wrote:
>>  	   case $$call in \
>>  	   *@@*) \
>> -	     ver=$${call##*@}; call=$${call%%@*}; ver=$${ver//./_}; \
>> +	     ver=$${call##*@}; call=$${call%%@*}; \
>> +	     ver=`echo $ver | sed 's/\./_/g'`; \
> 
> you need to quote "$ver"

AFAIK, $ver should never contain any IFS characters.  But yes, quoting
would generally be safer.  I'll do that.

Thanks,
-- 
Patrick "P. J." McDermott
  http://www.pehjota.net/
Lead Developer, ProteanOS
  http://www.proteanos.com/



More information about the Libc-alpha mailing list