Jonaz
Coder
Is it possible to color code an executive command in bash?
I would like uptime and the output to have a color, can I do that?
Code:
RED='\033[0;31m' # Green color is information text
GREEN='\033[0;32m' # Red color is commands executed
SLEEP='2' # How long the paus between every command should be
for ((i=1; i>0; i--))
do
sleep $SLEEP
eval "${RED}${NC} uptime \e[0m"
I would like uptime and the output to have a color, can I do that?