On Tue, 7 Nov 2006 11:03:53 -0500 (EST) David Korn wrote:
> > Does anyone know why
> > 
> > $ (ksh93 "mode='[[ "hello" == ~(E).*hello ]] && echo 'bar'")
> > bar
> > 
> > works but
> > 
> > $ (ksh93 "mode='~(E)' ; [[ "hello" == ${mode}.*hello ]] && echo 'bar'")
> > 
> > does not produce a match?

> When patterns are used as command arguments for file name generation,
> it does not recognize the characters ~ ( and ) as special so
> that old Bourne shell scripts will not break.  However, this
> should work inside [[ ... ]].

the quoting in this example is wrong
${mode} expands to nothing before ksh93 gets the string to execute
ksh -x shows this


Reply via email to