Skip to content

Instantly share code, notes, and snippets.

@iracooke
Last active August 1, 2018 23:32
Show Gist options
  • Save iracooke/2d2c6b254fea47c5b9466ee4ad24aa74 to your computer and use it in GitHub Desktop.
Save iracooke/2d2c6b254fea47c5b9466ee4ad24aa74 to your computer and use it in GitHub Desktop.
Tutorial 2 : Fix

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment