Re: Scripting-search for a word-URGENT

From: Kumar, Praveen (cahoot) (Praveen.Kumar@CAHOOT.COM)
Date: Thu Jan 15 2004 - 08:41:54 EST


Thanks Kamal!! It's working. But what is that script?? i hope it is
something to do with sed. Can you brief what's that,also where can i get
more information on such maipulations.

Cheers
Praveen

-----Original Message-----
From: Mohamed Kamal [mailto:mohamed.kamal@SPDC.COM.EG]
Sent: 15 January 2004 12:56
To: aix-l@Princeton.EDU
Subject: Re: Scripting-search for a word-URGENT

Dear Praveen,
    You can use this command:

         sed -f test_script your_file | tail +3 | head -5
here is the test script
:a
/<AIX>/{
      n
      p
      b a
}

Best Regards
Mohammed Kamal
Systems Engineer

-----Original Message-----
From: Kumar, Praveen (cahoot) [mailto:Praveen.Kumar@CAHOOT.COM]
Sent: Thu, January 15, 2004 1:06 PM
To: aix-l@Princeton.EDU
Subject: Scripting-search for a word-URGENT

Hi *,
         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
Reg
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.

.sophos.3.77.01.15.



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