Here is an example of the usage of an IF Else with a Nested IF for writing a script for BASH:
#if it is past midnight but not yet 6 AM
if [ $current_hour -ge 0 -a $current_hour -lt 6 ]
echo "You are not in bed yet?"
#if it is 6PM but not yet 8PM
if [ $current_hour -ge 18 -a $current_hour -lt 20 ]
echo "Dinner time!"
Here are some BASH if/then logic syntax in-depth examples and tutorial via video: