From: Green, Simon (Simon.Green@EU.ALTRIA.COM)
Date: Tue Mar 16 2004 - 05:14:57 EST
I'm pretty sure you could do this with awk. If you're not familiar with it,
try searching the Internet for examples. I found this...
http://www.ecs.soton.ac.uk/docs/gnu/gawk/gawk_1.htm
...quite useful a little while ago.
Perl could do it, of course.
You could probably cobble something together using grep -n and tail -n +XX"
Say...
export IFS=':'
grep -n <pattern> <file>|read First Junk
tail -n +$First <file>
Perl or Awk would be more efficient, but if this is a one-off that might do.
-- Simon Green Altria ITSC Europe Ltd AIX-L Archive at https://new-lists.princeton.edu/listserv/aix-l.html New to AIX? http://publib-b.boulder.ibm.com/redbooks.nsf/portals/UNIX N.B. Unsolicited email from vendors will not be appreciated. Please post all follow-ups to the list. > -----Original Message----- > From: Kumar, Praveen (cahoot) [mailto:Praveen.Kumar@CAHOOT.COM] > Sent: 16 March 2004 09:42 > To: aix-l@Princeton.EDU > Subject: Pattern Match query > > > Hi *, > i have a large file where i want to search for a > pattern and once > the pattern is matched i want all the content of the file > after the first > occurence of the match till the EOF. i have tried this using > nl etc but > could not really make it up.It woudl be great if some one can > give me some > idea.
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:42 EDT