shell script to check the directory exists
DIR="/etc/httpd/"
if [ -d "$DIR" ]; then
### Take action if $DIR exists ###
echo "Installing config files in ${DIR}..."
else
### Control will jump here if $DIR does NOT exists ###
echo "Error: ${DIR} not found. Can not continue."
exit 1
fiDirectory="/opt"
if [ -d "$Directory" ];
then
echo -e "it's exits\n"
fi
### To check if it's not exists
if [ ! -d "$Directory" ];
then
echo -e "It's not there\n"
fi
Also in C++:
- how to pip install tensorflow
- Calling Non-checksummed download of pup formula file from an arbitrary URL is disabled!
- bagisto
- cd in linux
- how to install mongodb server in ubuntu
- find total commit in git by specific user
- download teamviewer for ubuntu using terminal
- yarn clear cache
- git reflog reset
- remove pycache files from github
- styled-components
- angular/animations install npm
- awk delimiter semi-colon
- bash how to generate md5 checksums on all files in a directory
- git remove staged area
- eslint npm install
- fuser install linux
- create virtual env pyhton3
- how to delete command from terminal history
- github readme stats
- git rename remote
- install git ubuntu
- driver san francisco ui mode error
- ingnore large files in github