I wrote this code to echo a greeting depending on what time of day it is, but when I run it it doesn't show any errors but doesn't echo anything to the command line either. To try to troubleshoot I commented out everything and echoed just the time variable, which worked fine. So, what am I doing wrong?!
#!/bin/bash time=$(date +%H) case $time in #check if its morning [0-11] ) echo "greeting 1";; #check if its afternoon [12-17] ) echo "greeting 2";; #check if its evening [18-23] ) echo "greeting 3" esac