I want to change the colour of echo for a particular statement in a Linux shell script
example :
echo "invalid entries"
echo "valid entries"
echo "valid entry"
I want the red color for echo "invalid entries"
statement; the rest of them should be same as the default color.
Best Answer
Use
tput
to get the control sequences (if they exist) for the user's terminal: