The book originally had:
0? 1[0-1] ) echo "Good Morning";;
1[2-7] )....
*)...
This didn't work either.
I was able to get yours to work, but I had to add a 0 in front of all the single hour numbers - 02 instead of 2.
Thanks for your help!
Can anyone help with this simple script? It is right out a Unix manual I have. I get the error below:
hour=`date | cut -c12-13`
case $hour in
[$hour -lt 12] ) echo "Good Morning" ;;
[$hour -lt 18] ) echo "Good Afternoon" ;;
*) echo...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.