Linux Command to find the color of output text of last executed command
I have one small question.
how to find the color of output text of last command executed.
suppose i execute a command.
$ itkadmin config -nwid ora2gchild -set nd.baseMomSchemaFile -edit
### its output things in green when success and red when some has went wrong
$ file not updates
I want a command that can find the color of the output of last command executed and
then i can continue if green and exit if red , with the output of last command on screen ,
so that user can check and correct the error.
I wanted the commands to run in shell script.
Thank You in Advance.