Loading ...
Sorry, an error occurred while loading the content.

FW: OR Opertion

Expand Messages
  • Rahul_Chauhan
    Vims Well I joined this mailing list yesterday, maybe I am answering a query already answered. But finding many answers to a query is the essence of a mailing
    Message 1 of 1 , Jan 29, 2002
    • 0 Attachment
      Vims

      Well I joined this mailing list yesterday, maybe I am answering a query
      already answered. But finding many answers to a query is the essence of a
      mailing list.

      The answer Sinclair has given is very right. To add to his contribution ,the
      normal grep invoked, does not support the tag "-e"

      You will have to invoke grep from the following directory.
      /usr/xpg4/bin/grep -e exp1 -e exp2 <filename>

      That's the path on the sun machine I use, maybe it's the same check the man
      pages for grep to find the path on your version of UNIX,LINUX.

      Rahul

      ----------
      From: Gavin Sinclair [SMTP:gsinclair@...]
      <mailto:[SMTP:gsinclair@...]>
      Sent: Wednesday, January 30, 2002 4:32 AM
      To: Kumar_Anil; vim@... <mailto:vim@...>
      Subject: Re: OR Opertion

      In addition to the answer already given, for the particular purpose you
      mentioned, try "grep -e pat1 -e pat2 -e pat3 file1 > file2".
      (This is not a vim command, of course.)
      Gavin

      ----- Original Message -----
      From: "Kumar_Anil" <Kumar_Anil@... <mailto:Kumar_Anil@...> >
      To: <vim@... <mailto:vim@...> >
      Sent: Saturday, January 26, 2002 8:02 PM
      Subject: OR Opertion


      > Hi Vimmers,
      >
      > is an "OR" opertion possible while extracting lines containing
      particular
      > expressions from a given file .
      >
      > for eg i want to extract all the lines contain'g eiher "expression
      1 " or
      "
      > expression 2" from a given file to a new file .
      >
      > Regds
      > Anil
      >
      **************************************************************************
      > This email (including any attachments) is intended for the sole
      use of the
      > intended recipient/s and may contain material that is CONFIDENTIAL
      AND
      > PRIVATE COMPANY INFORMATION. Any review or reliance by others or
      copying
      or
      > distribution or forwarding of any or all of the contents in this
      message
      is
      > STRICTLY PROHIBITED. If you are not the intended recipient, please
      contact
      > the sender by email and delete all copies; your cooperation in
      this regard
      > is appreciated.
      >
      **************************************************************************
      **************************************************************************
      This email (including any attachments) is intended for the sole use of the
      intended recipient/s and may contain material that is CONFIDENTIAL AND
      PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
      distribution or forwarding of any or all of the contents in this message is
      STRICTLY PROHIBITED. If you are not the intended recipient, please contact
      the sender by email and delete all copies; your cooperation in this regard
      is appreciated.
      **************************************************************************
    Your message has been successfully submitted and would be delivered to recipients shortly.