Run these commands from within the tutorial 2 directory
mkdir -p bin
touch bin/greet.sh
Copy content from greet.sh above into the file greet.sh that you just created
Change permissions
chmod a-x bin/greet.sh
#!/usr/bin/env bash | |
h=`date +%H` | |
if [ $h -lt 12 ]; then | |
echo Good morning | |
elif [ $h -lt 18 ]; then | |
echo Good afternoon | |
else | |
echo Good evening | |
fi |