![]() |
Recommended GREP for windows?
At work, my machine runs windows (can't change that). I could really benefit from the functionality of grep on a certain project (repetative find and replaces over a group of files) . I don't have admin rights on the PC. I would like to find a free grep for windows that can live outside of ProgramFiles (so that I can try it out.) If it works out ok, I can petition to have it properly installed.
Does anyone have any recommendations? I have looked at a few of the top hits on our fav search engine. |
The [url=http://unxutils.sourceforge.net/]GNU utilities for Win32[/url] cotain command line versions of egrep.exe, fgrep.exe and grep.exe. Try "grep --help" for more info.
|
Thanks for that pointer. I think that will now be on my home machine....
I found [URL="http://notepad-plus-plus.org/"]Notepad++[/URL] I have tried it and it seems to work well for one thing that I really wanted, multiline find and replace. I can highlight the text and replace all occurances in whateever file type in a directory. I parked it in a temp folder (it can live on a USB drive). Free [COLOR="Green"]√[/COLOR] Does not have to be in Program Files [COLOR="green"]√[/COLOR] Does not nee to write to registry [COLOR="green"]√[/COLOR] Multiline find and replace [COLOR="green"]√√[/COLOR] Multifile actions [COLOR="green"]√[/COLOR] Commandline driven [COLOR="Red"]Χ[/COLOR] Overall a big win. :tu: |
Will, you kindly help us with "regular expressions"
(search and replace) ? search . Replace &\t start 01f result 0\t1\tf ( \t = tab ) ( & | $ ) [COLOR="Magenta"]not working properly[/COLOR] (Thanks) |
You an also install MinGW and Msys, which will give you a complete unix environment without touching the registry. If you put the path to the MinGW and Msys binaries in your environment then you can also use a large number of common text utilities from the windows command prompt.
By the way, to do an automated search and replace over multiple files I find 'sed' is more useful. |
I take it people have a downer on Cygwin for some reason? (perhaps because it writes to the registry?).
Chris |
[QUOTE=Chris Card;230855]I take it people have a downer on Cygwin for some reason? (perhaps because it writes to the registry?).
Chris[/QUOTE]I have a downer on it because it is GPL licensed. To be able to redistribute binaries their sources must also be redistributed under the GPL. If the source is Free but not GPL (BSD for instance) you can't send anyone a binary. Paul |
[QUOTE=xilman;230856]I have a downer on it because it is GPL licensed. To be able to redistribute binaries their sources must also be redistributed under the GPL. If the source is Free but not GPL (BSD for instance) you can't send anyone a binary.
Paul[/QUOTE] I understand, but the original question was about grep. Chris |
Cygwin reproduces a posix environment much more faithfully than MinGW does, which means its various pieces are integrated together much more tightly than I'd like. At least twice now, I've had to install new versions of packages I've needed, but if the cygwin install is more than a year old then nothing will work unless I throw it all away and get the latest version of [i]everything[/i]. Not that something basic like grep would have that problem, but it's a pain to need version of X+1 of something and then put everything on hold while cygwin reinstalls.
Another problem I've noticed is that installing packages in cygwin requires the ability to run cygwin install scripts, which means you have to use their setup utility to run everything and track down dependencies. With MinGW you just unzip the new package into your current install. Using the setup utility means needing network access for it to get all the packages it needs; that sounds like a no-brainer, until you have to install cygwin on a machine with no or restricted network access. What can you do then, put a whole cygwin mirror on a DVD? |
[QUOTE=jasonp;230876]Cygwin reproduces a posix environment much more faithfully than MinGW does, which means its various pieces are integrated together much more tightly than I'd like. At least twice now, I've had to install new versions of packages I've needed, but if the cygwin install is more than a year old then nothing will work unless I throw it all away and get the latest version of [i]everything[/i]. Not that something basic like grep would have that problem, but it's a pain to need version of X+1 of something and then put everything on hold while cygwin reinstalls.
Another problem I've noticed is that installing packages in cygwin requires the ability to run cygwin install scripts, which means you have to use their setup utility to run everything and track down dependencies. With MinGW you just unzip the new package into your current install. Using the setup utility means needing network access for it to get all the packages it needs; that sounds like a no-brainer, until you have to install cygwin on a machine with no or restricted network access. What can you do then, put a whole cygwin mirror on a DVD?[/QUOTE] On the other hand, I've found it much easier to set up a development environment with Cygwin (though to be honest I now tend to run Fedora as a VirtualBox guest). I don't remember having to reinstall everything, though the cygwin dlls do change from time-to-time. Chris |
[QUOTE=Chris Card;230855]I take it people have a downer on Cygwin for some reason? (perhaps because it writes to the registry?).[/QUOTE]
:direction: But that is ok. The original need has been filled. |
| All times are UTC. The time now is 08:05. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.