Re: variables set on command line

2011-08-24 Thread Eric Blake
On 08/24/2011 10:07 AM, Sam Steingold wrote: * Eric Blake [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. Such is life when dealing with shell portability. So if

Re: variables set on command line

2011-08-24 Thread Sam Steingold
> * Eric Blake [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 "`./lib

Re: variables set on command line

2011-08-24 Thread Eric Blake
On 08/24/2011 09:24 AM, Sam Steingold wrote: CYGWIN_NT-5.2-WOW64 sds 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin BASH_VERSION='4.1.10(4)-release' at the bash prompt I observe this: $ f(){ echo a=$a b=$b c=$c ; } $ unset a b c $ a=a b=b f a=a b=b c= $ f a= b= c= which I believe is correct (i.e.

variables set on command line

2011-08-24 Thread Sam Steingold
CYGWIN_NT-5.2-WOW64 sds 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin BASH_VERSION='4.1.10(4)-release' at the bash prompt I observe this: $ f(){ echo a=$a b=$b c=$c ; } $ unset a b c $ a=a b=b f a=a b=b c= $ f a= b= c= which I believe is correct (i.e., variables set in "a=a b=b f" are unset after