Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Matts (1087)

  (email not shown publicly)

I work for MessageLabs [] in Toronto, ON, Canada. I write spam filters, MTA software, high performance network software, string matching algorithms, and other cool stuff mostly in Perl and C.

Journal of Matts (1087)

Wednesday April 09, 2003
11:38 AM

Lock up OSX fun

[ #11549 ]

$ grep -hair 'SomeString' . > strings.txt

Think about it...

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • seems like you'd want to
    grep -air
    instead... unless you don't care where it is.

  • It does a depth first search writing maches to "strings.txt" and when it gets back to "." it finds more matches in "strings.txt" and carries on matching until the disk fills up.

    Even if it isn't a depth first search it will probably get into an infinite loop unless there aren't any matches in the search root directory.

    Something like that? :-)

    • Yup. Except on Linux it doesn't lock up X (or anything). On OS X it locks up the window manager, hard.
      • For as much as I love OSX and think that it's stable, it really doesn't do well with the seriously freaky stuff. I've locked the display twice now by accidentally pointing the Wallpaper configurator in System Preferences at a directory containing a 500meg .tif, wherupon it proceeds to try to create a thumbnail of it for me, you know, to be helpful.