Move under www to ease rsync
This commit is contained in:
21
www/eps/hpr2659/hpr2659_bash11_ex2.sh
Executable file
21
www/eps/hpr2659/hpr2659_bash11_ex2.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# Read a reply from the user, then check it's not zero length
|
||||
#
|
||||
read -r -p "Please enter a string: " reply
|
||||
if [[ ${#reply} -eq 0 ]]; then
|
||||
echo "Please provide a non-empty reply"
|
||||
else
|
||||
echo "You said: $reply"
|
||||
fi
|
||||
|
||||
#
|
||||
# Read a reply from the user, then check it's not zero length
|
||||
#
|
||||
read -r -p "Please enter a string: " reply
|
||||
if [[ -z $reply ]]; then
|
||||
echo "Please provide a non-empty reply"
|
||||
else
|
||||
echo "You said: $reply"
|
||||
fi
|
||||
Reference in New Issue
Block a user