in reply to Inplace editing, dos one liner, without a backup file?
Update: Oops. fixed the error in variable name in ":processFile" .. also took advantage of "%0" .. thanks ikegami!REM foo.bat @echo OFF IF "%1" == "process" GOTO processFile GOTO convertAll :convertALL FOR %%f IN (c:\temp\*.txt) DO CALL %0 process "%%f" GOTO end :processFile SET in=%2 perl -p -i -e "s/change this/to this/g" %in% del %in%.bak GOTO end :end
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Inplace editing, one liner, without a backup file?
by tphyahoo (Vicar) on Aug 09, 2005 at 13:02 UTC | |
by ikegami (Patriarch) on Aug 09, 2005 at 13:31 UTC |