On Sun, 5 Nov 2006 19:18:07 +0100 Josh Hurst 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?

the outer "-quoting probably doesn't do what you expect
run with -x to see:

  (ksh93 -x "mode='~(E)' ; [[ "hello" == ${mode}.*hello ]] && echo 'bar'")

try this which should print 0 for match

  ksh 'mode="~(E)" ; [[ xhellox == ${mode}.*hello ]]; print $?'

-- Glenn Fowler -- AT&T Research, Florham Park NJ --


Reply via email to