Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

shell script to check the directory exists

Directory="/opt"
if [ -d "$Directory" ];
then
	echo -e "it's exits
"
fi
### To check if it's not exists
if [ ! -d "$Directory" ];
then 
	echo -e "It's not there
"
fi
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #shell #script #check #directory #exists
ADD COMMENT
Topic
Name
8+8 =