Bin/sh^m:bad interpreter:no such file or directory resolves
The reason is that the. Sh script was written in a Notepad file under Windows system. The encoding format of the different systems is caused. Career Change file encoding format: 1, to ensure that users have read and write files and execute rights [email protected]:~/RMAN/bin> chmod a+x Test.sh 2, then modify the file format (1) Use VI tools [email protected]:~/rman/bin > VI test.sh (2) Use the following command to view file formats :set FF or: Set fileformat & nbsp; you can see the following information fileformat=dos or fileformat=unix (3) modify the file format with the following command :set Ff=unix or: Set fileformat=unix  :WQ (save to exit) 3, final execution & nbsp [email protected]:~/rman/bin>/test.sh linux execute. SH script error: Command not found Command not found this problem is generally a novice like me to commit, so just learn Linux children's shoes encounter this problem can see my explanation, may give you help. Actually this problem may be caused by a lot of reasons, today I met the reason is worth attention, generally we write Java code when the definition of variables like this "String test = " ”; ”。 Today I wrote a shell script that defines a variable in the script ("host =" "), and the result is executedNow this command is not found. I was pondering ah, how to think can not think why, and then I finally found that the problem is a space in the mischief, in fact, in the definition of a shell script variable between the variable name and equal sign is not allowed to have spaces, and I wrote the test and = there is a space between, so the system defaults that test is a command , so the system cannot find this command.
Bin/sh^m:bad interpreter:no such file or directory resolves