Shell Script for checking existence of a directory -
if[-d /abmusr06/abm/users/dywrk01/run_time]; echo "pack installation failed" exit(1) fi
this above code fine?
assuming bourne shell (/bin/sh):
if [ -d /abmusr06/abm/users/dywrk01/run_time ] echo "pack installation failed" exit 1 fi
- put spaces around brackets:
if [ -d
. think of[
(key)word - needs stand itself. wouldn'tls-l
,ls
(space)-l
. - use
exit 1
, notexit(1)
. - the semicolons unnecessary if on separate lines.
- the above seems work in cygwin me.
Comments
Post a Comment