Hi,
I am writing a script to issue a Unix ps command and with some grep to give a sample output such as this:
application_name -m some_value -p some_value -C some_value -d 0 -c 0
The value I am really after is the some_value after "-p". What would be the best way to extract the value right after the "-p" parameter assuming the "-p" may appear any where (but just once) after the application_name?
Thanks
Mike
I am writing a script to issue a Unix ps command and with some grep to give a sample output such as this:
application_name -m some_value -p some_value -C some_value -d 0 -c 0
The value I am really after is the some_value after "-p". What would be the best way to extract the value right after the "-p" parameter assuming the "-p" may appear any where (but just once) after the application_name?
Thanks
Mike