Red Hat Enterprise Linux > Configuration > Issue
<<
506 of 606
>>
Issue:
How do I fix 'bad interpreter' error messages when trying to run shell scripts?
Resolution:
More often than not, this error indicates that the script in question has been written on a machine which inserted CR/CRLF's into the script (old MS-DOS style newline/linefeeds). Sometimes they appear as ^M's in the file where a newline is defined. Try running the command:
dos2unix <script name>
The command should return a prompt after it completes. Try running the script again to see if the 'bad interpreter' error message has cleared.
Please note that depending on how your editor is configured, the CR/CRLF differences in a file may be invisible.
Red Hat Enterprise Linux
>
Configuration
> Issue
<<
506
of
606
>>