neeyoo11

GreetingSysTimeBased

May 26th, 2022 (edited)
185
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. clear
  2. h=`who am i | tr -s " " | cut -d " " -f4 | cut -d ":" -f1`
  3. if [ $h -lt 12 ]
  4. then
  5. echo "Good Morning"
  6. else if [ $h -ge 12 -a $h -lt 17 ]
  7. then
  8. echo "Good Afternoon"
  9. else
  10. echo "Good Evening"
  11. fi
  12. fi
  13.  
RAW Paste Data Copied