Re: Scripting-search for a word-URGENT
From: Mohamed Kamal (mohamed.kamal_at_SPDC.COM.EG)
Date: Thu, 15 Jan 2004 14:55:49 +0200 To: aix-l@Princeton.EDU
You can use this command:
sed -f test_script your_file | tail +3 | head -5
here is the test script
From: Kumar, Praveen (cahoot) [mailto:Praveen.Kumar@CAHOOT.COM]
Sent: Thu, January 15, 2004 1:06 PM
Subject: Scripting-search for a word-URGENT
I want to search for a string in a file say <AIX>, then display the
next five lines after this line. Can someone help me doing this...I hope
this is possible using sed which i am already looking at.
Thanks in advance
Internet communications are not necessarily secure and may be intercepted or
changed after they are sent. cahoot does not accept liability for any such
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
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.