Problem description
After the SH file is written in windows, an error will be reported when running in Linux: bash: $’\ R’: command not found
Problem-solving
This is because the windows system uses - for file wrapping, while the UNIX system uses - for file wrapping
Problem-solving
Method 1
Install dos2unix for file conversion
yum install -y dos2unix
dos2unix aaa.sh
Method 2
Use VIM to open the file, and then use the command: set FF = UNIX </ KBD>, save the file
# use vim to open file
vim aaa.sh
# change formate
:set ff=unix
# save file
:wq
Read More:
- How to Solve Linux Error: -bash: unzip: command not found
- Linux Install Bee and Execute Error: bash: bee: command not found
- [Solved] Linux Mongodb Error: # Error: coul-bash: connecting: command not found
- Mac opens Terminal and reports an error -bash:: command not found
- -bash: sqlplus: command not found [How to Solve]
- MAC Adb Shell Error: -bash: adb: command not found, adb
- linux Ubuntu Error: No command ‘setenv‘ found
- Chinese garbled problem when running. C file in Linux
- [Solved] websocket error in Linux service: / lib64 / libc. So. 6: version ` glibc_2.17‘ not found
- [Solved] ERROR: Subproject directory not found and gst-plugins-base.wrap file not found
- arm-eabi-gcc: command not found [How to Solve]
- After Centos installation is complete, ifconfig: command not found
- [Solved] Linux virtual machine startup error: operating system not found
- Git commit – M ‘upload submit times error command “husky run” not found.
- Linux Install Docker Error: Failed to restart docker.service: Unit docker.service not found.
- [Solved] G++ Error: Command ‘g++‘ not found, but can be installed with:
- Mgr [error]: library file libdmhs_exec.so not found, error: 0
- Solution to gzip: stdin: invalid compressed data — format violated error in decompressing. Tgz file under Linux
- Linux Ubuntu ImportError: Libtk8.5.so: cannot open shared object file:No such file Install tkinter Library
- Linux system service command error: Failed to allocate directory watch: Too many open files