On 11/7/06, Glenn Fowler <gsf at research.att.com> wrote:
>
> 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
OK
Could you provide an example which works? I've trying to get it
working without success since a week :(
-- 
Josh

Reply via email to