Re: Scripting-search for a word-URGENT

From: Mohamed Kamal (mohamed.kamal_at_SPDC.COM.EG)
Date: 01/15/04

  • Next message: Kumar, Praveen (cahoot): "Re: Scripting-search for a word-URGENT"
    Date:         Thu, 15 Jan 2004 14:55:49 +0200
    To: aix-l@Princeton.EDU

    Dear Praveen,
        You can use this command:

             sed -f test_script your_file | tail +3 | head -5
    here is the test script
          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

    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.

  • Next message: Kumar, Praveen (cahoot): "Re: Scripting-search for a word-URGENT"