When running the written shell script, the error prompt $'\ \ R': command not found
appears
The reason for the error is that when we operate in Windows system, the newline character in the editor is \\\\\\\\\\\\\\\\\
There are two ways to deal with it
1. VI command to enter the file to be edited, press ESC key to enter the command mode, execute the following command, press enter key, and then save to exit the file
: set ff=unix
2. The second kind
yum -y install dos2unix
dos2nuix install.sh
The above install. SH is the script you wrote. Use dos2nuix to process the files
Similar Posts:
- Conversion to MySQL shell script execution error $’\ R’: command not found
- [Solved] “/bin/bash^M: bad interpreter: No such file or directory”
- Solve the problem of shell script “syntax error near unexpected token ` fi ‘”.
- How to Solve Error: set ff? /bin/bash^M: bad interpreter: No such file or directory
- Shell Error: bash: ./a.sh: /bin/bash^M: bad interpreter: No such file or directory [How to Solve]
- [Solved] Centos7 Execute Script Error: syntax error near unexpected token `fi’
- For piix4_ Solution of SMBus * * host SMBus controller not enabled (detailed steps summary)
- [Solved] Python Error: /usr/bin/python^M: bad interpreter: No such file or directory
- When installing MySQL database on MAC, the system prompts MySQL: command not found
- Screeps Server Install screepsmod-mongo Error: node\r file or directory does not exist