Generic Grep Tool

I am seeking tools (especially GUI tools) that will perform regular expression, grep like search and replaces. Ideally the tool would be open source, multiplatform and would provide the functionality of BBEdit:

BBEdit search window

Requirements include:

  • Transparent handling of line endings
  • Able to recursively descend through various directories
  • File filters to determine what to search
  • Autodetection of character encodings

I could write this myself in Java, but not by my deadline. Any suggestions?

8 Responses to “Generic Grep Tool”

  1. anjan bacchu Says:

    hi there,

    have you considered sed ?

    BR,
    ~A

  2. Elliotte Rusty Harold Says:

    The problem with Unix tools like sed, grep, and perl (besides the lack of a GUI) is that they don’t deal well with multiple line ending conventions, and they can’t easily handle nested directory hierarchies. They are designed to work on one Unix file at a time, not a big collection of files from multiple platforms. They also have trouble once you move beyond ASCII.

    What’s nice about BBEdit is that it provides the full power of grep in a reasonable (though imperfect) GUI. However, it’s payware and Mac OS X only.

  3. Tony Cowderoy Says:

    jEdit?

  4. Elliotte Rusty Harold Says:

    Excellent idea! Thank you! That looks like almost exactly what I need, and to the extent it isn’t I can hack on it to make it so.

  5. Neville Rowe Says:

    I’d second jEdit – I’ve been using it for far-too-long on both Mac and PC and find it very good. Mac integration isn’t great (I’ve been meaning to do something about it for ages but haven’t got around to it yet) – my gripes are
    1. if jEdit is running with edited files when you shutdown or logout it cancels the shutdown rather than displaying a dialog.
    2. menus in the wrong place.
    3. if you exit jEdit with the window minimised, when you open it again it is still minimised, and you cannot click on the app icon in the doc to get it to maximise – you have to click on the document.

    None of which are serious and it is it still my preferred text editor on all platforms.

    N.

  6. Paul King Says:

    jEdit is probably the way to go. If you want something in Perl, check out:
    http://pleac.sourceforge.net/pleac_perl/patternmatching.html
    Look for Program: tcgrep

    It is definitely in the unix-style tool genre but it does recursive searches, inside zip files, paragraph mode.

    I have written an equivalent in Groovy (still command line but a GUI would be easy to add). It supports Ant style include/exclude specifiers and is a short program that is easy to modify yourself. Happy to pass on the code if you want.

  7. anjan bacchu Says:

    hi elharo,

    it looks like more people like jEdit — I agree!

    Are you trying to remove the SEARCH REPLACE tool from jEdit and make it a separate app ?

    Thank you,

    BR,
    ~A

  8. The Cafes » My Next Book Says:

    […] With a little luck, the book should be on store shelves sometime this summer. I’ve already posted a number of questions that arose while writing it. I’m going to be posting a lot more over the next couple of months. I also plan to post many small excerpts from the book for your perusal and comment. I hope you’ll help out by commenting on, caviling, and correcting the draft pieces I’ll be posting here. […]

Leave a Reply