Change the font of text in output file in shell scipt

hi,

I want to change the font of text in output file. :frowning:

I tried the below code
code:

if awk 'BEGIN{if('$RSS'>='1000')exit 0;exit 1}'
then
RED=`echo "\033[31m"`
echo "${RED} $Process exceeds 1000M on $PID \033[0m" >>output.txt
else
GREEN=`echo "\033[32m"`
echo "${GREEN} Memory Utilization is normal for $Process on $PID \033[0m" >>output.txt
fi

i can see colors in terminal but not in output file :wall:

please help me how i can get colors text in output file.

if awk 'BEGIN{if('$RSS'>='1000')exit 0;exit 1}'
then
RED="\033[31m"
echo -e "${RED} $Process exceeds 1000M on $PID \033[0m" >>output.txt
else
GREEN="\033[32m"
echo -e "${GREEN} Memory Utilization is normal for $Process on $PID \033[0m" >>output.txt
fi