I often use something like read -e -p \"> All good ? (y/n)\" -n 1 confirm;
to ask a confirm to the user.
I\'m looking for a way to colorize the outpu
Break your query into two components:
e.g:
echo -e -n "\e[0;31mAll good (y/n)? " # Display prompt in red
echo -e -n '\e[0;0m' # Turn off coloured output
read # Collect the user input
The echo -n option suppresses the trailing newline.