Change text color in Korn shell to highlight Error

Hi this is my first post, so forgive me if what I'm requesting doesn't make sense.

I'm connecting into a Unix server via SSH and using a Korn Shell (#!/bin/ksh). The Unix server has Oracle 11g installed on it and there are a number of scripts already setup to query the Oracle database to perform specific functions (ex: reset a user's password, etc.).

When running these scripts the output shows more information then I want to see (ex: information about the oracle database connection). I want only specific text in the output to be colored (ex: successful text = green, error text = red).

Example 1:

Database connection text...
ERROR: The command you specified is invalid.
More database text...

Example 2:

Database connection text...
SUCCESS: The command completed successfully.
More database text...

The one problem is I don't have access to edit these scripts, so I was looking at adding some custom code into the /etc/bashrc or /etc/profile file to accomplish this. Is this possible? I have been playing with adding code in the /etc/profile to change the prompt colors, but not sure how to change the color of specific text from a scripts output. Also I can look at the code inside the script, which starts out like this ($ORACLE_HOME/bin/sqlplus maint/). Any insight into how I could do this is appreciated.

This thread might help.

Try filtering your log files through e.g. awk:

 awk '/SUCCESS/ {$0="\033[32;1m"$0"\033[0m"} /ERROR/ {$0="\033[31;1m"$0"\033[0m"} 1'