34 lines
961 B
Bash
34 lines
961 B
Bash
#!/bin/bash
|
|
RED=$(tput setaf 1)
|
|
GREEN=$(tput setaf 2)
|
|
YELLOW=$(tput setaf 3)
|
|
BLUE=$(tput setaf 4)
|
|
MAGENTA=$(tput setaf 5)
|
|
CYAN=$(tput setaf 6)
|
|
WHITE=$(tput setaf 7)
|
|
RESET=$(tput sgr0)
|
|
BOLD=$(tput bold)
|
|
|
|
uptime=`cat /proc/uptime | cut -f1 -d.`
|
|
upDays=$((uptime/60/60/24))
|
|
upHours=$((uptime/60/60%24))
|
|
upMins=$((uptime/60%60))
|
|
upSecs=$((uptime%60))
|
|
|
|
echo -e "${GREEN}
|
|
.:^~~~~^:. ${RESET}$(hostname)${GREEN}
|
|
.^!?JJJJJJJJJJ?!^. -------------------------------------------------
|
|
~?JJJJJJJJJJJJJJJJ?~ ${RESET}$(cat /etc/redhat-release)${GREEN}
|
|
:?JJJJJJJJJJJJJJJJJJJJ?: ${RESET}Uptime: ${BOLD}$upDays days $upHours hours $upMins minutes $upSecs seconds${GREEN}
|
|
.?JJJJJJJJJJJJJJ7?JJJJJJ?.
|
|
!JJJJJJJJJJJJJ7: ^?JJJJJ!
|
|
7JJJJJJJJJJJ!: ^7JJJ7
|
|
!JJJJJJJJJ!. :. :7J!
|
|
.?JJJJJ?~. :7JJ!. :.
|
|
:?JJ?~. ^7JJJJJJ!:
|
|
.~~ ^?JJJJJJJJY?:
|
|
^?YYJJJJJJ?!^.
|
|
.:^~~~~^:.
|
|
${RESET}
|
|
"
|
|
|