Shell portability question

Enache Adrian enache@rdslink.ro
Sun Sep 7 19:23:00 GMT 2003


On Sun, Sep 07, 2003 a.d., Daniel Jacobowitz wrote:
>     case $ac_arg in
>     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
>     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
>     | -silent | --silent | --silen | --sile | --sil)
>       continue ;;
>     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
>       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
>     esac
> 
> If ac_arg="'a\1b'", then that case statement matches using bash and doesn't
> using ash.  I'm not sure why.  But if you add a space to it, then ash eats

try changing it from:
	*" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
to:
	*" "*|*"    "*|*[\[\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*|*]*)

Regards,
Adi



More information about the Gcc mailing list