From 29f7fc03eb95317baf428f4c098d32d6096650cc Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Thu, 1 Oct 2015 15:23:41 -0700 Subject: [PATCH] Updated Dos2Unix Text file format converters (markdown) --- Dos2Unix---Text-file-format-converters.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dos2Unix---Text-file-format-converters.md b/Dos2Unix---Text-file-format-converters.md index 8806b2c..763e9fb 100644 --- a/Dos2Unix---Text-file-format-converters.md +++ b/Dos2Unix---Text-file-format-converters.md @@ -4,6 +4,11 @@ The EOL (End Of Line) character in UNIX is '\n' Editing UNIX files on Windows changes the EOL fron UNIX to DOS, which might make the unix build tools not working. Also this make file comparison difficult. Use the following steps to batch convert files from DOS to UNIX EOL: +Using PowerShell +```powershell +Get-ChildItem -File -Recurse | % { $x = get-content -raw -path $_.fullname; $x -replace "`r`n","`n" | set-content -path $_.fullname } +``` + * Download _**dos2unix.exe**_ program from [http://sourceforge.net/projects/dos2unix/?source=typ_redirect](http://sourceforge.net/projects/dos2unix/?source=typ_redirect) * Uncompress the compressed file (lets say, dos2unix-7.3-win32.zip) * Put the bin directory of the uncompressed file (that has dos2unix.exe and other prorgrams) in system path