The hard disk is damaged and the system is reinstalled. An error is reported when executing the previous script
Syntax error: “(” unexpected (expecting “}”)
Troubleshooting:
ls -l /bin/sh
The default link is dash
Knowledge supplement
Bash: Unix shell written for GNU Project
SH: equivalent to /bin/bash –posix. It is bash that opens POSIX standard
Dash: it has faster execution speed than bash, but supports fewer statement leaves
Solution:
Here, I have no requirements for the speed of script execution, only that it can be used, so I can change it to bash
cd /bin/; ln -sf bash /bin/sh
l
Problem-solving.
Read More:
- Shell Script syntax error near unexpected token `done’
- Ubuntu shell Script syntax error near unexpected token `$‘{\r‘‘
- [Solved] Shell error: syntax error: unexpected end of file
- Running shell script reports an error: “syntax error near unexpected token solution ‘”
- [Solved] Linux shell Script Error: syntax error near unexpected token `do
- [Solved] Bash: Syntax error: redirection unexpected
- [Solved] bash: /etc/vimrc: line 15: syntax error near unexpected token `“autocmd“‘
- Windows writes shell script and executes shell error [Solved]
- [Solved] yum command Error: “except keyboardinterrupt, e: syntax error: invalid syntax”“
- [Solved] Linux SSH Login Terminal Error: shell request failed on channel 0
- Shell: How to Get System Current Tme and Format it
- Centos7 Start Error: Entering emergency mode.Exit the shell to continue
- Prompt “entering emergency mode. Exit the shell to continue” if the Linux operating system does not start normally
- MAC Adb Shell Error: -bash: adb: command not found, adb
- The JSON variable is parsed in the shell to obtain the value corresponding to the key
- [Solved] Error during WebSocket handshake Unexpected response code 404
- [Solved] ImportError:lib***.so–cannot open shared object file: No such…(pycharm/clion Error but shell No Error)
- [Solved] CUDA initialization: Unexpected error from cudaGetDeviceCount()
- [Solved] Except CvBridgeError,e:SyntaxError:invalid syntax
- [Solved] Module yaml error: Unexpected key in data: static_context