replace text with cygwin or some script
Posted on 2006-04-30
I'm trying to do what I did in UNIX a lot, replace text phrases in files in the current directory and subdirectories. I have Cygwin, but can't get the syntax correct. If there is a better shell or a better way, I'd like to know that too .
I like emacs, so ideally I'd do this in an emacs shell on Windows XP.
the sed command I'd use has the form:
sed 's/\/lt\//\/lt4\//g' * > ???? ;replace "/lt/" with "/lt4/" and do this with files in all subdirectories too
So, for each file found it should make that replacement and put it back in the same file name. I've never done a script in Windows, only c-shell in UNIX, so I'm not sure of the methodology or language.
Thanks for the help.