“Syntax error near unexpected token then” in Linux sh execution
This problem is usually caused by the file format
Open sh script with Vi
Input: set FF = UNIX
Then save it
Similar Posts:
- [Solved] “/bin/bash^M: bad interpreter: No such file or directory”
- shell :syntax error: unexpected end of file
- [Solved] Centos7 Execute Script Error: syntax error near unexpected token `fi’
- shell :syntax error: unexpected end of file
- [Solved] Python Error: /usr/bin/python^M: bad interpreter: No such file or directory
- How to Solve Error: set ff? /bin/bash^M: bad interpreter: No such file or directory
- Conversion to MySQL shell script execution error $’\ R’: command not found
- How to Solve .sh: line 6: syntax error near unexpected token `do
- Shell script error newline syntax error near unexpected token
- Shell Error: bash: ./a.sh: /bin/bash^M: bad interpreter: No such file or directory [How to Solve]