Write a shell script under Windows, upload to Linux run the Times wrong:
Copy Code code as follows:
[Root@localhost test]#./test.sh
-bash:./test.sh:/bin/sh^m:bad interpreter:no such file or directory
Test.sh Source:
Copy Code code as follows:
#!/bin/sh
echo "Test Shell"
Because I am not familiar with the shell, to find colleagues to understand the cause of communication, the main reason is that test.sh I ed
First, use in the shell if you need to enter some values, you need to use the READ-P commandThis is what I wrote. Guess the number game, at the beginning of the output, the screen will always print output "INT" after repeated practice to findDouble quotes should be followed by a space , and then write the variable, you will not print the variable to the screen!Continue in-depth update of the shell script error
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.