The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 05-27-2009
edgarvm edgarvm is offline
Registered User
  
 

Join Date: May 2009
Posts: 26
I have done a few modifications to your solution, try this:

Code:
grep -e '-[EW]-' input.txt | sed 's/^.*\(-[EW]-\)/\1/'