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:
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?
January 14th, 2007 at 10:37 AM
hi there,
have you considered sed ?
BR,
~A
January 14th, 2007 at 11:18 AM
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.
January 14th, 2007 at 12:21 PM
jEdit?
January 14th, 2007 at 2:18 PM
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.
January 15th, 2007 at 8:08 AM
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.
January 15th, 2007 at 4:56 PM
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.
January 18th, 2007 at 9:39 PM
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
February 10th, 2007 at 8:01 PM
[…] 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. […]