In my scripts I nearly always use escape sequences for colours:
R='\e[0m'
g='\e[0;32m'
echo -e "${g}green text${R}"
I'd like to make -e default behaviour so I can omit it. How?
You can setup an alias:
alias echo='echo -e'
With it active, you can omit the -e:
echo "${g}green text${R}"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With