Professional Web Applications Themes

find string in files - SCO

Hello, Can someone give me a simple shell script that search for a specific string in all files ? Same as MS Windows' "Search/Find in file" functionality. Regards, Elias...

  1. #1

    Default find string in files

    Hello,

    Can someone give me a simple shell script that search for a specific
    string in all files ?

    Same as MS Windows' "Search/Find in file" functionality.

    Regards,
    Elias
    lallous Guest

  2. #2

    Default Re: find string in files

    lallous typed (on Fri, Jul 25, 2003 at 11:47:07AM -0700):
    |
    | Can someone give me a simple shell script that search for a specific
    | string in all files ?

    find / -type f | xargs grep "specific string" /dev/null | less

    --
    JP
    Jean-Pierre Radley Guest

  3. #3

    Default Re: find string in files

    lallous typed (on Tue, Aug 05, 2003 at 12:23:40AM +0300):
    | thanks JP, it works.
    |
    | can you dissect and explain it please ?

    Perhaps you have noticed another thread over the last four or five
    days, in this newsgroup, regarding "Merge", where Tony and Bela and
    I have pointed out that it is necessary to provide some context in
    Usenet messages.

    If you want me to explain "it", then you must tell me what "it" is.
    While I pride myself on having a pretty decent memory, nothing requires
    me to remember what sort of "it" I may have provided yesterday, or last
    week, or last month.

    It is *your* responsibilty to provide some some context, which is
    satisfied by (minimal, please!) quoting of prior messages. Neither I
    nor anyone else is being paid to dig through prior postings to find out
    what was said in them.

    As it is, your message is floating around with no references, no quotes,
    no anchor, no context; it is a waste of bytes and a waste of time.

    --
    JP
    Jean-Pierre Radley Guest

  4. #4

    Default Re: find string in files

    Hello JP,

    You have a point....
    Now I realized that your news reader doesn't show you the messages in a tree
    like structure, if that wasn't the case then you could have just see your
    previous post and my original post just below each other. (same as Google
    Groups display)

    The 'it' referes to this expression:
    find / -type f | xargs grep "specific string" /dev/null | less

    But nevermind though, I figured it out.

    Regards,
    Elias


    --- Original Message ---
    lallous typed (on Tue, Aug 05, 2003 at 12:23:40AM +0300):
    | thanks JP, it works.
    |
    | can you dissect and explain it please ?

    Perhaps you have noticed another thread over the last four or five
    days, in this newsgroup, regarding "Merge", where Tony and Bela and
    I have pointed out that it is necessary to provide some context in
    Usenet messages.

    If you want me to explain "it", then you must tell me what "it" is.
    While I pride myself on having a pretty decent memory, nothing requires
    me to remember what sort of "it" I may have provided yesterday, or last
    week, or last month.

    It is *your* responsibilty to provide some some context, which is
    satisfied by (minimal, please!) quoting of prior messages. Neither I
    nor anyone else is being paid to dig through prior postings to find out
    what was said in them.

    As it is, your message is floating around with no references, no quotes,
    no anchor, no context; it is a waste of bytes and a waste of time.

    --
    JP


    lallous Guest

  5. #5

    Default Re: find string in files


    "Jean-Pierre Radley" <jprjpr.com> wrote in message
    news:20030804213358.GC5409jpradley.jpr.com...
    > lallous typed (on Tue, Aug 05, 2003 at 12:23:40AM +0300):
    > | thanks JP, it works.
    > Neither I
    > nor anyone else is being paid to dig through prior postings to find out
    > what was said in them.
    Actually, I occassionally, hopefully get paid to "dig through prior
    postings" :)

    I tell clients comp.unix.sco.misc is my biggest trade secret. I even give
    them the link and show them how to look. Fortunately most still hire me to
    read it for them.


    Bob Meyers Guest

Similar Threads

  1. can't find string with quotes
    By Ferger in forum Coldfusion - Getting Started
    Replies: 4
    Last Post: June 9th, 10:00 PM
  2. Find and cut string
    By Ola Ekedahl in forum PHP Development
    Replies: 1
    Last Post: November 23rd, 01:48 PM
  3. [PHP] find string
    By Carl Furst in forum PHP Development
    Replies: 3
    Last Post: August 11th, 12:19 AM
  4. find in string
    By Bite My Bubbles in forum ASP
    Replies: 4
    Last Post: August 9th, 08:02 PM
  5. find string between files
    By e.group in forum Sun Solaris
    Replies: 1
    Last Post: August 3rd, 11:17 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139