THE sh file cannot be modified in windows.
Because most people use windows as the operating system and the visual interface of windows is more user-friendly, when modifying a linux sh file, edit it with editplus to facilitate pulling it to the window, after uploading it back to linux, the sh cannot run. The error message is: command not found.
The cause is the CR/LF problem. In dos/window, press the Enter key once. In fact, the input is "Enter CR)" and "line feed LF )", in linux/unix, press the Enter key once and only enter "line feed LF)". Therefore, the modified sh file has an additional CR in each line, therefore, when running in linux, an error is reported and the command cannot be found.
Solution:
1. Use UltraEdit to write a shell script in windows. After writing the script, you can avoid command notfound errors and Chinese garbled errors caused by different windows carriage returns and LINUX carriage returns using the following methods.
1). configurable file-> conversion->DOS-> UNIX.
2). After the modification, You need to click the file-> set to save as, the encoding method is selected as UTF-8-no BOM, save UNIX line break-LF ). As shown in.
650) this. width = 650; "width =" 553 "height =" 137 "src ="/e/u/themes/default/images/spacer.gif "style =" border: 1px solid # ddd; "alt =" spacer.gif "/>