> * Eric Blake <roy...@erqung.pbz> [2011-08-24 09:31:45 -0600]: >> f(){ echo a=$a b=$b c=$c ; } >> f >> a= b= c= >> a=a b=b f >> a=a b=b c= >> f >> a=a b=b c= > > Which is indeed correct under the rules for POSIX
This sucks big time. So if I want to bind a variable for an eval invocation and do this: eval "`./libtool --tag=CC --config | grep '^archive_cmds='`" CC='${CC}' libobjs='$libs' deplibs='${CLFLAGS}' compiler_flags='${CFLAGS}' \ soname='$dll' lib='$lib' output_objdir='$dyndir' \ eval XCC_CREATESHARED=\"${archive_cmds}\" and I want CC to have an old value after the second eval, I need to save it and restore it by hand, like this: CC_save=$CC CC='${CC}' libobjs='$libs' deplibs='${CLFLAGS}' compiler_flags='${CFLAGS}' \ soname='$dll' lib='$lib' output_objdir='$dyndir' \ eval XCC_CREATESHARED=\"${archive_cmds}\" CC=$CC_save however, this does not distinguish between unset CC and CC=''. (is there a way to distinguish these two situations?) thanks! -- Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 11.0.60900031 http://ffii.org http://palestinefacts.org http://honestreporting.com http://thereligionofpeace.com http://openvotingconsortium.org http://dhimmi.com Abandon all hope, all ye who press Enter.