Re: Grep Question

From: Alexandre Sato (alexandre.sato_at_BR.ABNAMRO.COM)
Date: 03/02/04

  • Next message: Bill Verzal: "Re: Grep Question"
    Date:         Tue, 2 Mar 2004 17:02:00 -0300
    To: aix-l@Princeton.EDU
    
    

    Are you doing something like this?

    cat file.txt | grep 82.44.203.222.82681071601925321 > file1.out

    or

    grep 82.44.203.222.82681071601925321 file.txt > file1.out

    In any case you think any char is making a diference in grep command, put
    the string into double quotes, like this:

    cat file.txt | grep "82.44.203.222.82681071601925321" > file1.out

    or

    grep "82.44.203.222.82681071601925321" file.txt > file1.out

    Regards,

    Alexandre Sato.

    "Kumar, Praveen (cahoot)" <Praveen.Kumar@CAHOOT.COM>
    Sent by: IBM AIX Discussion List <aix-l@Princeton.EDU>
    03/02/04 04:33 PM
    Please respond to IBM AIX Discussion List

            To: aix-l@Princeton.EDU
            cc:
            Subject: Grep Question

    Hi *,
           I want to search for a string (82.44.203.222.82681071601925321)
    from
    a file. i have around 150 similar number , so i am using a script to do
    this...my script does not create file even after redirecting...can some
    let
    me know where am i failing.

    i think when i am doing grep it takes .(dot) in the literal meaning.

    TIA
    Praveen

    ---------------------------------------------------------------------------
    This message (including any attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorised use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change.
    ABN AMRO Bank N.V. (including its group companies) shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system. ABN AMRO Bank N.V. (or its group companies) does not guarantee that the integrity of this communication has been maintained nor that this communication is free of viruses, interceptions or interference.
    ---------------------------------------------------------------------------


  • Next message: Bill Verzal: "Re: Grep Question"

    Relevant Pages

    • Re: tell me how many specific words there are in the file?
      ... I'm trying to get the user to enter a word, then the script should ... Off the top of my head, I can't think of a grep command that will ... Am I overlooking something? ... COMPONENT EQUIVALENCY NOTICE: The subatomic particles (electrons, ...
      (comp.unix.programmer)
    • Re: bash null conditional
      ... Craig White wrote: ... A125 definitely is null when I just run the grep command in the quotes ... The double quotes make a string, but it looks like you which to be executing grep which is accomplished by using the $notation. ... Justin Willmert ...
      (Fedora)
    • Problem using grep through the unix shell: doesnt accept a regular expression in filename
      ... I'm using the following simple grep command through a .sh shell ... grep "mypattern" < $1 ... However it works perfectly when i execute it on the command prompt by ... replacing $1 by *.txt for example, but when I call the script using ...
      (comp.unix.shell)
    • Re: Q: How to use boolean values and return codes in shell scripts?
      ... On Sat, 20 Sep 2003 at 04:19 GMT, Bernard wrote: ... > I would like to learn how to use boolean values in a script. ... > One example is the return value of a grep command as follows which ...
      (comp.os.linux.misc)
    • Re: tell me how many specific words there are in the file?
      ... Pascal Bourguignon writes: ... I'm trying to get the user to enter a word, then the script should ... Off the top of my head, I can't think of a grep command that will ... Am I overlooking something? ...
      (comp.unix.programmer)