I think I ran across a bug in a batch file because it was written with unix line endings. Is this a known problem with cmd.exe running batch files in windows?
Windows – Is it safe to write batch files with Unix line endings
batch-filewindows
Related Topic
- Windows – Line break in batch file
- Iterating through folders and files in batch file
- Windows – How to move all files except the newest one to a folder
- Net use mapping not working in batch files but works in cmd
- Remote installing programs by scripts or batch files
- Windows – Amazon S3 – Automated Backup Using S3Sync, Windows Schedule & BAT file
- Run Batch File from Task Scheduler Without User Login – Windows 7 Guide
Best Answer
This really isn't a "bug"... as it is by-design. Windows new-lines are defined as "\r\n" ... or a "Carriage Return" and "New Line" combination... whereas *nix flavors prefer omitting the carriage return. You should always use "\r\n" in anything in Windows where possible. Anything else may be interpreted incorrectly... and cause a great deal of unexpected results.