Seismology

There has been quite a long hiatus in my posts on SeismoBunji because I have been occupied with my PhD milestones. I hope to post here more frequently as the time allows me 🙂

#!/bin/bash
# Try running this script from your terminal :)
# Costa de Lima, T

# Asking the user an important question !
echo "Have you done science today? (yes/no)"

read varname

if [ "$varname" == "no" ];then
echo "Hum... das not good. Go do some science and come back later."


else if [ "$varname" == "yes" ];then
echo "Hum... Was the science good?"
read var_1
if [ "$var_1" == "yes" ];then
echo "Awesome! You deserve a chocolate :D"
else
echo "That is okay. You still deserve a chocolate :-)"

fi
fi
fi

# What if the user types something different from 'yes' or 'no'?
# Think about a way that you could adapt this script!
# Hint: perhaps you can try adding a loop condition.