Binsh ^ M: badinterpreter: Nosuchfileordirectory the reason is that the sh script is written in the notepad file in windows. Encoding formats of different systems. The encoding format of the transfer file: 1. ensure that you have read and write permissions on the file or bin/sh ^ M: bad interpreter: No such file or directory. sh scripts are written in notepad files in windows. Encoding formats of different systems. Transfer file encoding format: 1, ensure that the user has read and write permissions on the file oracle @ linux-106 :~ /RMAN/bin> chmod a + x test. sh 2. then modify the file format (1) use vi tool oracle @ linux-106 :~ /RMAN/bin> vi test. sh (2) use the following command to view the file format: set ff or: set fileformat. you can see the following information: fileformat = dos or fileformat = unix (3) use the following command to modify the file format: set ff = unix or: set fileformat = unix: wq (save disk exit) 3. finally execute oracle @ linux-106 :~ /RMAN/bin>. /test. sh in Linux. sh Script error: command not found this problem is generally made by a newbie like me. so if you encounter this problem in linux, please refer to my explanation, may help you. In fact, this problem may be caused by many reasons. the reason I encountered today is worth noting. we generally like to write "String test =" "when writing java code to define variables." Today, I wrote a shell script that defines a variable ("host =") in the script. this command not found appears when the result is executed. I thought for a while, but I couldn't figure out why. later, I finally found out that the problem was caused by a space, in fact, space is not allowed between the variable name and equal sign when defining the shell script variables, and I write a space between test and =, so the system defaults, test is a command, so the system cannot find this command. Remember, small issues sometimes make you stuck.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.