Re: Pattern Match query

From: Frank Chiavoni (Frank.Chiavoni@OIT.STATE.NJ.US)
Date: Tue Mar 16 2004 - 09:01:07 EST


Praveen,

Try this...

 sed -n '/pattern/,${N;s/.*\n//;P;}' large.file

-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@Princeton.EDU]On Behalf Of
Kumar, Praveen (cahoot)
Sent: Tuesday, March 16, 2004 4:42 AM
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.

TIA
Warm Regards
Praveen.K

*********************
Internet communications are not necessarily secure and may be
intercepted or
changed after they are sent. cahoot does not accept liability for any
such
changes.
If you wish to confirm the origin or content of this communication,
please
contact the sender using an alternative means of communication.

This communication does not create or modify any contract.

This email may contain confidential information intended solely for
use by
the addressee. If you are not the intended recipient of this
communication
you should destroy it without copying, disclosing or otherwise using
its
contents.

Please notify the sender immediately of the error.

cahoot is a division of Abbey National plc.
Abbey National plc is registered in England, registered number
2294747.
Registered Office: Abbey National House, 2 Triton Square, Regent's
Place,
London, NW1 3AN.



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:42 EDT