I recently moved back to Windows from Linux. I have some files with CRLFs, some with LFs and some that are mixed. Is there a utility that will help me find all my Unix-touched files and convert them to proper CRLF terminated files?
The utility must run on Windows, not Linux. I have already moved. I'd rather not install Cygwin if I can avoid it.
Answer
You can convert them with the unix2dos
utility on your Linux platform. There are unix2dos
versions available for Windows as well.
If you have Perl installed you can also use this one liner:
perl -p -e 's/\n/\r\n/' < UNIX_LF.txt > WINDOWS_CRLF.txt
No comments:
Post a Comment