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

Re: recursive grep (RE: [vim] engspchk v1.25 (now v1.27))

Expand Messages
  • Dr. Charles E. Campbell
    ... find . -exec echo {} ; | xargs agrep matchstring Regards, C Campbell -- Charles E Campbell, Jr, PhD _ __ __ Goddard Space Flight
    Message 1 of 3 , Jan 29, 2001
    • 0 Attachment
      Thus saith Jean Jordaan:
      > I'd just do something like:
      >
      > $ find . | xargs agrep "matchstring"
      >
      > Is this bad? Is there a better way?

      find . -exec "echo" "{}" ";" | xargs agrep "matchstring"

      Regards,
      C Campbell

      --
      Charles E Campbell, Jr, PhD _ __ __
      Goddard Space Flight Center / /_/\_\_/ /
      cec@... /_/ \/_//_/
      PGP public key: http://www.erols.com/astronaut/pgp.html/
    • Jeff Walker
      OT, but that seems to do the same thing as find . for me. Does your version require find . -print ? -- Jeff Walker MatchLogic, Inc.
      Message 2 of 3 , Jan 29, 2001
      • 0 Attachment
        OT, but that seems to do the same thing as "find ." for me.

        Does your version require "find . -print" ?

        --
        Jeff Walker MatchLogic, Inc.
        jwalker@... 7233 Church Ranch Blvd.
        Voice 1 (303) 222-2105 Westminster, CO 80021
        Fax 1 (303) 222-2001 www.matchlogic.com


        > -----Original Message-----
        > From: Dr. Charles E. Campbell [mailto:cec@...]
        > Sent: Monday, January 29, 2001 8:58 AM
        > To: vim@...
        > Subject: Re: recursive grep (RE: [vim] engspchk v1.25 (now v1.27))
        >
        >
        > Thus saith Jean Jordaan:
        > > I'd just do something like:
        > >
        > > $ find . | xargs agrep "matchstring"
        > >
        > > Is this bad? Is there a better way?
        >
        > find . -exec "echo" "{}" ";" | xargs agrep "matchstring"
        >
        > Regards,
        > C Campbell
        >
        > --
        > Charles E Campbell, Jr, PhD _ __ __
        > Goddard Space Flight Center / /_/\_\_/ /
        > cec@... /_/ \/_//_/
        > PGP public key: http://www.erols.com/astronaut/pgp.html/
        >
      • raf
        ... the echo {} ; runs slower here than just having find print the file names. what s the point? if find doesn t print by itself, isn t -print faster?
        Message 3 of 3 , Jan 29, 2001
        • 0 Attachment
          Dr. Charles E. Campbell wrote:

          > Thus saith Jean Jordaan:
          > > I'd just do something like:
          > >
          > > $ find . | xargs agrep "matchstring"
          > >
          > > Is this bad? Is there a better way?
          >
          > find . -exec "echo" "{}" ";" | xargs agrep "matchstring"

          the "echo" "{}" ";" runs slower here than just having
          find print the file names. what's the point? if find
          doesn't print by itself, isn't "-print" faster?
          another speed up would be to use -n with xargs
          so there are fewer agrep processes.

          raf
        Your message has been successfully submitted and would be delivered to recipients shortly.