Re: [lopsa-tech] Help with bash or find or grep or something

2014-09-13 Thread Robert Hajime Lanning
On 09/13/14 16:05, Allan West wrote: On 9/13/14 3:11 PM, Robert Hajime Lanning wrote: I have run into issues with "-print" and "xargs"... spaces in filenames... Doesn't happen much when dealing with source code (.c .cs .h), but it happens a lot when dealing with music and documents from Windows/

Re: [lopsa-tech] Help with bash or find or grep or something

2014-09-13 Thread Allan West
On 9/13/14 3:11 PM, Robert Hajime Lanning wrote: > On 09/13/14 11:51, Doug Hughes wrote: >> FWIW: this is a perfect use case for xargs instead of exec. You'll save >> a lot of fork/clone system calls and simplify your find. Brandon pointed >> out the main problem, but consider this alternative: >

Re: [lopsa-tech] Help with bash or find or grep or something

2014-09-13 Thread David N. Blank-Edelman
On Sep 13, 2014, at 2:51 PM, Doug Hughes wrote: > FWIW: this is a perfect use case for xargs instead of exec. Or, something like ack (http://beyondgrep.com) and its scions (e.g. https://github.com/ggreer/the_silver_searcher). -- dNb ___ Tech m

Re: [lopsa-tech] Help with bash or find or grep or something

2014-09-13 Thread Steve VanDevender
Robert Hajime Lanning writes: > On 09/13/14 11:51, Doug Hughes wrote: > > FWIW: this is a perfect use case for xargs instead of exec. You'll save > > a lot of fork/clone system calls and simplify your find. Brandon pointed > > out the main problem, but consider this alternative: > > > > fi

Re: [lopsa-tech] log forwarder for graylog2

2014-09-13 Thread David Lang
On Fri, 12 Sep 2014, David Nolan wrote: On Friday, September 12, 2014, David Lang wrote: In general, I dislike the methodology of writing data to disk for another file to scrape and do something with. There are just so many things that can go wrong It depends on your requirements for tho

Re: [lopsa-tech] Help with bash or find or grep or something

2014-09-13 Thread Robert Hajime Lanning
On 09/13/14 11:51, Doug Hughes wrote: > FWIW: this is a perfect use case for xargs instead of exec. You'll save > a lot of fork/clone system calls and simplify your find. Brandon pointed > out the main problem, but consider this alternative: > > find . -name '*.cs' -print -o -name '*.c' -print -

Re: [lopsa-tech] Help with bash or find or grep or something

2014-09-13 Thread Doug Hughes
On 9/13/2014 8:25 AM, Edward Ned Harvey (lopser) wrote: Can anybody explain this behavior to me? I'm searching for files that contain the string "LockFile" in them. I know of one place where it exists already... But the following command only returns one result, which is not the result I alrea

Re: [lopsa-tech] Help with bash or find or grep or something

2014-09-13 Thread Dan Ritter
On Sat, Sep 13, 2014 at 12:25:28PM +, Edward Ned Harvey (lopser) wrote: > Can anybody explain this behavior to me? > > I'm searching for files that contain the string "LockFile" in them. I know > of one place where it exists already... But the following command only > returns one result, w

Re: [lopsa-tech] Help with bash or find or grep or something

2014-09-13 Thread Edward Ned Harvey (lopser)
> From: Brandon Allbery [mailto:allber...@gmail.com] > > Nope; bug in your brain. As soon as you start using -o / -or, you need to deal > with precedence. > >     find . \( -name '*.[ch]' -o -name '*.cs' \) -print Bahhh! Thank you. That was very non-intuitive. In fact, either using parenthes

Re: [lopsa-tech] Help with bash or find or grep or something

2014-09-13 Thread Brandon Allbery
On Sat, Sep 13, 2014 at 8:45 AM, Edward Ned Harvey (lopser) < lop...@nedharvey.com> wrote: > Actually, I got it: For some reason, the find command itself finds > "file-io.c" in its results, but when I do "-exec" then it only results in > '*.h' files printing out. I'm reasonably certain that's a

Re: [lopsa-tech] Help with bash or find or grep or something

2014-09-13 Thread Edward Ned Harvey (lopser)
> From: tech-boun...@lists.lopsa.org [mailto:tech-boun...@lists.lopsa.org] > On Behalf Of Edward Ned Harvey (lopser) > > I'm searching for files that contain the string "LockFile" in them.  I know of > one place where it exists already...  But the following command only returns > one result, which

[lopsa-tech] Help with bash or find or grep or something

2014-09-13 Thread Edward Ned Harvey (lopser)
Can anybody explain this behavior to me? I'm searching for files that contain the string "LockFile" in them. I know of one place where it exists already... But the following command only returns one result, which is not the result I already knew existed. Edwards-MacBook-Pro:mono eharvey$ find