ever since i learned perl a year or two ago, i literally haven't touched shell scripting other than reading other people's scripts, so i'm a bit rusty, however, i think bourne style conditionals have the form:
if [ condition ] then do something fi
or:
if test condition then do something fi
Any command (or pipeline) can follow the if. "test condition" and "[ condition ]" are just commands commonly used here. Something like this is perfectly legal:
if mkdir -p $workingdir
then
cd $workdir
else
# mkdir would have printed an error message
exit 1
fiAlthough my scripts generally create directories like this:
[ -d $dir ] || mkdir -p $dir || exit 1
-- Kenneth Herron [EMAIL PROTECTED] 916-366-7338 _______________________________________________ vox-tech mailing list [EMAIL PROTECTED] http://lists.lugod.org/mailman/listinfo/vox-tech
