cc:  ksh93-integration-discuss at opensolaris.org  pkchris at 
users.sourceforge.ne          don.cragun at sun.com
Subject: Re: Re: [shell-discuss] [ksh93-integration-discuss] CR 6791838 Created 
 P3 shell/korn93 *ksh93* unset of a variablewhich is not set  should return 0
--------

> [[ ${x+y} ]] would check if a variable exists? Which function does y in
> ${x+y} have?
> 
> Chris
> -- 
> 

y can be anything other than the null string.

[[ y ]] just checks whether y is the empty string or not.


Therefore this will either be

[[ ]] if x is unset  -> exit status 1

or 
[[ y ]] if x is set -> exit status 0.

David Korn
dgk at research.att.com

Reply via email to