What's the best way to convert Windows/DOS files to Unix in batch?
It could be done with somewhat shorter command.
find ./ -type f | xargs -I {} dos2unix {}
You should be able to use tr
in combination with xargs
to do this.
On the Unix side at least, this should be the simplest way. However, I tried doing it that way once on a Windows box over a decade ago, but discovered that the Windows version of tr
was translating my terminators right back to Windows format for me. :-( However, I think in the interveneing decade the tools have gotten smarter.