To parse the line

Hi,

I have a line QMNAME(qmgrname) STATUS(RUNNING)
Can u jus tell me how to only get the status field ? And also the value of the status whether it is running or not running.

--
Thanks

Try

$ echo 'QMNAME(qmgrname) STATUS(RUNNING)' | sed 's/.*STATUS(\(.*\))/\1/'

Hi,

Thanks a lot..Its working :slight_smile:

--
Thanks