Advertisement
STANAANDREY

pb incalzire 3

Feb 22nd, 2024
1,031
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.31 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3.  
  4. currUser=$(whoami)
  5. hiMess=""
  6. h=$(date +%H)
  7.  
  8. if [ $h -ge 6 -a $h -lt 12 ]; then
  9.    hiMess="Buna dimineata"
  10. elif [ $h -ge 12 -a $h -lt 18 ]; then
  11.     hiMess="Buna ziua"
  12. elif [ $h -ge 18 -a $h -lt 22 ]; then
  13.     hiMess="Buna seara"
  14. else
  15.     hiMess="Noapte buna"
  16. fi
  17.  
  18. echo $hiMess  $currUser
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement