I am writing scripts to initialize and configure a large system with many components.
Each component has its own log file.
I would like to change the color of the component file name to red whenever an error
occur on its installation/configuration.
How can I do it?
Best Answer
Google will find you the answer. Print Hello world in red:
Explained
Look at http://en.wikipedia.org/wiki/ANSI_escape_code for full list of colors and other functions (bold etc).
The command tput, if available, will make life easier:
Can even save sequences in vars for simpler use.