cc: [email protected]
Subject: Re: [ast-users] [ksh93] [[ == ]] does not update ${.sh.match}?
--------

> See following example:
> 
> $ echo ${.sh.version}
> Version jM 93u 2011-02-08
> $
> $ [[ foo == foo* ]] && echo matched
> matched
> $ typeset -p .sh.match
> typeset -a .sh.match=(foo)    <== this is fine
> $
> $ [[ bar == bar ]] && echo matched
> matched
> $ typeset -p .sh.match
> typeset -a .sh.match=(foo)    <== it's not updated
> $
> 

.sh.match only gets set for pattern matches, not for string matches.
If the right hand side does not contain any of the special pattern
characters, it will do a string match.  Using douoble quotes around
the right hand operand will do a string match.

David Korn
[email protected]
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to