The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Special Forums > UNIX Desktop for Dummies Questions & Answers
.
google unix.com




Thread: Grep
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 05-25-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,920
If it's a fixed-field record with '*' as the separator, you could use
Code:
awk -F'*' '{print $49}' file

Otherwise, if you only want the part after 'N1*PR*', this Perl snippet might help:
Code:
perl -ne 'print $1,"\n" if /N1\*PR\*(.*?)\*/;' file