> $ man bash
> unset [-fv] [name ...]
> ... The exit status is true unless a name does not exist or is
> readonly.
>
> $ set|grep mmm
> $ unset mmm; echo $?
> 0
>
> mmm didn't exist, but the exit status was still true.
>
> Actually, I'd rather you change the man page so that unsetting non
> existent variables is not an error, else many of my bash -e scripts
> will fail.
I changed the man page a while back to remove the case where
the name does not exist.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Live...Laugh...Love
Chet Ramey, ITS, CWRU chet@po.cwru.edu http://tiswww.tis.cwru.edu/~chet/
[Prev in Thread]
Current Thread
[Next in Thread]
Re: unsetting non existent variables,
Chet Ramey<=