Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- function get_time
- {
- local hour="`date +%H`"
- local emoji="a"
- if [ $hour -lt 10 -a $hour -gt 6 ]; then
- emoji="🌅"
- elif [ $hour -lt 15 ]; then
- emoji="☀️"
- elif [ $hour -lt 20 ]; then
- emoji="🌇"
- else
- emoji="🌓"
- fi
- current_time="`date +%H:%M:%S`";
- echo "$current_time $emoji";
- }
- get_time
Add Comment
Please, Sign In to add comment