3.1 Common Problems and Solutions

Table 3-1 Common Problems and Solutions

Topic

Problem

Solution

Shell Scripts

Scripts won’t run after changes are made on a Windows machine.

Because DOS uses different ASCII characters to indicate a line ending (CR,LF) than Linux/UNIX (LF only), shell script files that were created or modified on a Windows system do not run on Linux until they are converted to UNIX format.

The quickest solution is usually to enter the following command at a command prompt:

dos2unix filename

where filename is the name of the text file needing to be converted.

Also, many text editors have an option to save files in UNIX format.