in reply to dos2unix line endings on Windows
You clobber the caller's PERLIO. Fixed:
@echo off if "%1"=="" goto usage setlocal set PERLIO=perlio for /r %1 %%X in (*.*) do ( perl -pi.bak -e "s/\r\n/\n/g" "%%X" del "%%X.bak" ) goto bye :usage echo. echo USAGE: %0 directory echo. :bye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: dos2unix line endings on Windows
by flamey (Scribe) on Feb 11, 2010 at 17:26 UTC | |
by ikegami (Patriarch) on Feb 11, 2010 at 17:31 UTC | |
by flamey (Scribe) on Feb 11, 2010 at 19:17 UTC |