RED
, YLW
and GRN
with the ANSI escape sequences for red, yellow and green. This can be used as a template to colorize files (for example errors and warnings in a log file). sed 's/RED/\x1B[31m/g; s/GRN/\x1B[32m/g; s/YLW/\x1B[33m/g; s/END/\x1B[0m/g' testfiles/colorize
REDErrorsEND might be printed in red, YLWWarningsEND in yellow, and GRNinfosEND in green.