I am about to write a shell script. I would like to be able to visually distinguish some of its output text as a warning, by setting its color to yellow.
How is this done?
From "Shell colors: colorizing shell scripts":
echo -e "\033[33mThis is yellow\033[0m"
echo -e "\e[33mThis is yellow\e[0m"
\033 or \e as an Escape character starts the escape sequence, which in this case contains the controls to change colors.
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
2 years ago
9 months ago