On 1/13/09, David Korn <dgk at research.att.com> wrote:
> cc: don.cragun at sun.com April.Chin at eng.sun.com shell-discuss at
> opensolaris.org ksh93-integration-discuss at opensolaris.org
> Subject: Re: Re: CR 6791838 Created P3 shell/korn93 *ksh93* unset of a
> variablewhich is not set should return 0
> --------
>
>
> > Attached (as "ksh93_integration_unset_no_such_var_fix001.diff.txt") is a
> > prototype patch which fixes the problem (well, most of it, right now $
> > unset '1' # or $ unset '$' # do not return an error) and adds a new
> > option ("-e") to get the old behaviour for backwards-compatibilty.
> >
> >
>
>
> Why are you trying to merge the testing for whether a variable
> exists with unset? Aren't these orthogonal? Shouldn't they
> be done independently?
How do we test for functions in the future if if (unset -f
functionname); then echo 'function exists' ; fi no longer works? How
do we test for nameref variables instead of the variable referenced by
the nameref? unset -e -n var && echo 'true' works.
Jenny
--
Jennifer Pioch, Uni Frankfurt