
An example of a file with CR or LF characters is shown below:

In a bash script file, how can I see CR or LF encoding characters? You may also view the line end characters as LFCR or LFCR by View → Show Symbol → Show End of Line. The file contains Windows line endings markers, which causes Linux to be perplexed. The line feeding character is often used in Linux to indicate the ending of a line, whereas the two-character sequence CR/LF is often used in Windows-like operating systems. The “^M” character stands for carriage return. There is no such file instead, “/bin/bash” is used. The script specifies that it would be run using the “/bin/bash^M” shell. You might believe this is a permissions constraint and try using the chmod +x command to grant the shell script file all the required privileges, but this will not resolve the issue. The poor interpreter is another name for this error.

In this tutorial, we will look at how to fix the problem that occurs while running bash or.sh file on a Linux environment.

$ /bin / bash^M: bad interpreter: No such file or directory
