Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to extract words out of a variable 1

Status
Not open for further replies.

nm9204

Technical User
Feb 11, 2003
12
GB
hope you can help!!

I am running a task from the tec console and want to create a bash script using one of the Variables $msg,

I have tested it by echoing $msg to see what it gives me!
which was! = The Process IEXPLORE (pid 2072.000) is using too much CPU time.

What i would like to do in a script is extract words out of this variable, like IEXPLORE and (pid 2072.000).

I have tried to use various cmds to extract these, but having no luck.

can someone please advise
thanks

Nigel
 
Try
echo $msg|awk '{print $3" "$4}'

HTH Dickie Bird (:)-)))
 
Thanks Dickie it worked a treat !!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top