Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google site




Thread: Extract String
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 09-25-2006
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,148
Try this:

Code:

$ sed 's/\<[^<]*\>//g;s/.*mX *\([-0-9]*\).*$/\1/' < string
-151557
$ sed 's/\<[^<]*\>//g;s/.*mY *\([-0-9]*\).*$/\1/' < string
6768743
$