Note that line breaks are different for script files in linux from those in Windows.
Source: Internet
Author: User
Note that line breaks in script files in linux are different from those in Windows-Linux general technology-Linux programming and kernel information. For more information, see the following. When compiling the sh script file in linux, note that the file written in notepad in Windows cannot be directly executed in linuxshell, and the following error is prompted:
1: bad interpreter: No file or directory
The reason is: in Windows, the line feed is "\ r \ n", while in linux, "\ n" is not "\ r". When the shell file is written in Windows, all linefeeds are "\ r \ n". The file cannot be executed in shell, and the above error is prompted. Run "File-> conversions-> Dos to Unix" in ultraedit. The converted sh File can be directly executed in linux. In this step, the "\ r" symbol can be canceled.
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service