second commit
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
hostname=$(hostname -s)
|
||||
number=$(echo $hostname | grep -oP '[0-9]*$')
|
||||
hostname=${hostname%"$number"}
|
||||
rows=9
|
||||
|
||||
case $hostname in
|
||||
'prod')
|
||||
#print in RED
|
||||
echo -ne "\033[31;1m"
|
||||
;;
|
||||
'beta')
|
||||
rows=7
|
||||
#print in ORANGE
|
||||
echo -ne "\033[33;1m"
|
||||
;;
|
||||
'dev')
|
||||
rows=7
|
||||
#print in GREEN
|
||||
echo -ne "\033[33;1m"
|
||||
;;
|
||||
*)
|
||||
#print in GREEN
|
||||
echo -ne "\033[32;1m"
|
||||
;;
|
||||
esac
|
||||
|
||||
fullname="$hostname $number"
|
||||
figlet -f big "$fullname" | head -n$rows
|
||||
echo -ne "\033[0m"
|
||||
Reference in New Issue
Block a user