End of lines in input files
Using input files created on different operating system with OAS binary from another operating system can lead to reading error. There are 3? different EOL: unix \n, windows \r\n and mac \r.
OAS should be working without problem with unix and windows EOL (problem with white space before \n was fixed earlier).
Identify end of line in text files:
> file -k somefile.txt
- It will output with CRLF line terminators for DOS/Windows line terminators.
- It will output with CR line terminators for MAC line terminators.
- It will just output text for Linux/Unix "LF" line terminators. (So if it does not explicitly mention any kind of line terminators then this means: "LF line terminators".)
> cat -e filename.txt # This displays Unix line endings (\n or LF) as $ and Windows line endings (\r\n or CRLF) as ^M$ a CR=^M.
> dos2unix --info -- filename.inp # return number of lines with dos, unix, mac EOL
Convert EOL in files:
> dos2unix -c mac *.inp
> unix2dos *.inp
TODO:
Improve future reader e.g. https://stackoverflow.com/questions/6089231/getting-std-ifstream-to-handle-lf-cr-and-crlf .
Create tests with different EOL.