Using the echo "-e" flag causes color codes to be interpreted:

echo -e "\e[0;31mThis is red\e[0m"

echo "\e[0;31mThis is not red\e[0m"


Is there a way to do this with sed?

| sed -E "s/(something_to_highlight)/\e[0;31m\1\e[0m/g"


Richard





_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to