Talk:Conditional execution

From Linux Shell Scripting Tutorial - A Beginner's handbook
Jump to navigation Jump to search

Hey i am teacher of std 12th gujarat board in INDIA i have problem in if command i need help!!!! pls reply urgent on ashishdkakkad@gmail.com

  1. script 7 : This script greets a user with a massage.

clear hour='date +"%H" 'if [$hour -ge 0 -a $hour -lt 12] then echo "Good morning" elif [$hour -ge 12 -a $hour -lt 18] then echo "Good afternoon" else echo "Good evening" fi