in reply to "ack" and replace in a directory... in Windows?
Substitute the ack command for the dir command the following:
for /f %i in ('dir /b *.pl') do @perl -i*.bak -pe"s/foo/bar/g" %i
Note the requirement for specifying the extension with the -i switch.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: "ack" and replace in a directory... in Windows?
by mascip (Pilgrim) on Feb 29, 2012 at 12:17 UTC | |
by Anonymous Monk on Mar 01, 2012 at 03:44 UTC | |
by Anonymous Monk on Jul 23, 2012 at 22:55 UTC |