Guest User

Untitled

a guest
Jul 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #!/bin/bash
  2. function get_time
  3. {
  4. local hour="`date +%H`"
  5. local emoji="a"
  6. if [ $hour -lt 10 -a $hour -gt 6 ]; then
  7. emoji="🌅"
  8. elif [ $hour -lt 15 ]; then
  9. emoji="☀️"
  10. elif [ $hour -lt 20 ]; then
  11. emoji="🌇"
  12. else
  13. emoji="🌓"
  14. fi
  15. current_time="`date +%H:%M:%S`";
  16. echo "$current_time $emoji";
  17. }
  18.  
  19. get_time
Add Comment
Please, Sign In to add comment