For some reason my shell script stopped printing my menu in color and is actually printing the literal color code instead. Did I somehow escape the color coding?
Script
#!/bin/bash
function showEnvironments {
echo -e "\e[38;5;81m"
echo -e " SELECT ENVIRONMENT "
echo -e "[1] - QA"
echo -e "[2] - PROD"
echo -e "\e[0m"
}
showEnvironments
Output
\e[38;5;81m
SELECT ENVIRONMENT
[1] - Staging
[2] - QA
\e[0m
I am using iTerm on Mac OSX and the TERM
environment variable is set to xterm-256color
.
TERM
environment variable.echo "$stuff" >> myscript.sh