Move under www to ease rsync
This commit is contained in:
15
www/eps/hpr2659/hpr2659_bash11_ex1.sh
Executable file
15
www/eps/hpr2659/hpr2659_bash11_ex1.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# A directory we want to create if it doesn't exist
|
||||
#
|
||||
BASEDIR="/tmp/testdir"
|
||||
|
||||
#
|
||||
# Check for the existence of the directory and create it if not found
|
||||
#
|
||||
if [[ ! -d "$BASEDIR" ]]; then
|
||||
# Create directory and take action on failure
|
||||
mkdir "$BASEDIR" || { echo "Failed to create $BASEDIR"; exit 1; }
|
||||
echo "Created $BASEDIR"
|
||||
fi
|
||||
Reference in New Issue
Block a user