Coloring Shell Output

Mon 22 June 2015 by Godson

Using coloring, we can enhance output of shell script. Run following script in your terminal and see magic.

#!/bin/bash

#various color codes
color_lblue='\033[1;34m'
color_red='\033[1;31m'
color_lgreen='\033[1;32m'
color_custom='\033[1;33;44m'
color_no='\033[0m'

#ascii art 
printf "${color_custom}" 
cat <<EOF
_____ ___   ___  
|  ___/ _ \ / _ \ 
| |_ | | | | | | |
|  _|| |_| | |_| |
|_|   \___/ \___/ 
EOF
printf "${color_no}"