Hi,
Code:
#!/bin/bash
# Escape code
esc=`echo -en "\033"`
# Set colors
cc_red="${esc}[0;31m"
cc_green="${esc}[0;32m"
cc_yellow="${esc}[0;33m"
cc_blue="${esc}[0;34m"
cc_normal=`echo -en "${esc}[m\017"`
echo "Here's ${cc_green}some green text${cc_normal} for you."
echo "Here's ${cc_blue}some green text${cc_normal} for you."
The color codes (0;31 etc) are like those used in dir_colors:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
Hope this helps.