Tabs and Whitespace
- There is a special character called "Tab" whose ASCII value is 9. It is usually displayed as several adjacent whitespace characters.
- In some file-types (most notably Makefiles) tabs have a special meaning and cannot be substituted with their equivalent whitespaces.
- They would even reject a whitespace before the tab. (which often looks identical to a tab).
- Thus it is important to make sure your editor is configured so it inputs tabs at such files.
Carriage Returns
- On Linux and other UNIX systems, the lines of text files are terminated with a single character called "Newline" or "Linefeed".
- In DOS, and Windows, the Linefeed character is preceded by another character called Carriage Return.
- The problem is that some Linux tools will not tolerate CRs at the end of lines, so they have to be removed somehow.
- You can use the following command:
perl -pi -e 's/\r$//' [files]
to convert files from DOS-style to Linux/Unix-style.
Written by Shlomi Fish