Problem scenario
You run a shell or bash script but you receive an error message such as one of the following:
$’\r’: command not found
line:55 syntax error: unexpected end of file
Solution
Did you download the file from the internet directly to the Unix system? The root cause could be that there are invisible characters in the file.
If you can copy the content of the text into the Linux machine and have it run as a script,
…
Continue reading “How Do You Troubleshoot Error Messages in a Bash Script?”