On 1/12/13 10:07 AM, John Kearney wrote:
> regarding -e it mainly has a bad name because there is no good guide how
> to program with it.
> so for example this causes stress
> [ ! -d ${dirname} ] && mkdir ${dirname}
> because if the dir exists it will exit the scripts :)
I'm not sure this is what you wanted to say. When -e is set, that code
will not cause an error exit if ${dirname} exists and is a directory. Run
this script in the bash source directory and see what happens:
set -e
[ ! -d builtins ] && mkdir builtins
echo after
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/