Ok, die Syntax is'n bischen kniffelig.
| # escape sequence character as ascii code
echo -e "\\033[01;33m\e[46mYour string here in yellow on cyan...\\033[;0m"
# escape sequence character as bash buildin
echo -e "\e[01;33m\e[46mYour string here in yellow on cyan...\e[;0m"
|
Prinzipiell sieht das von der Syntax her so aus
escape-sequence (ascii \\033 or bash \e) [ attribute (00-01, 04-05, 07-08); text-color (30-37) escape-sequence [ background-color (40-47) ACTUAL STRING escape-sequence [ text-reset
Etwas mehr Informationen zu den Codes findet man auch in den Kommentaren der Ausgabe von
dircolors -p
Da steht dann u.a.
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# 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