This problem is raised by many posts as an interpreter problem
therefore, we only need to add
#!/bin/bash
If not, add
#!/usr/bin/env bash
If still not, use./xxx.sh instead of SH xxx.sh
Read More:
- [Solved] bash: /etc/vimrc: line 15: syntax error near unexpected token `“autocmd“‘
- [Solved] shell Error: Syntax error: “(“ unexpected (expecting “}“)
- Shell Script syntax error near unexpected token `done’
- Ubuntu shell Script syntax error near unexpected token `$‘{\r‘‘
- -bash: sqlplus: command not found [How to Solve]
- [Solved] Linux shell Script Error: syntax error near unexpected token `do
- Running shell script reports an error: “syntax error near unexpected token solution ‘”
- Mac opens Terminal and reports an error -bash:: command not found
- [Solved] Shell error: syntax error: unexpected end of file
- Error: error from slirp4netns while setting up port redirection: map[desc:bad request: add_hostfwd:
- How to Solve Linux Error: -bash: unzip: command not found
- [Solved] Failed to execute/bin/bash: resource temporarily unavailable
- Error in Linux running file: bash: $’\r’: command not found
- MAC Adb Shell Error: -bash: adb: command not found, adb
- Linux Install Bee and Execute Error: bash: bee: command not found
- [Solved] Linux Mongodb Error: # Error: coul-bash: connecting: command not found
- [Solved] yum command Error: “except keyboardinterrupt, e: syntax error: invalid syntax”“
- Linux solves nohup: ignoring input and appending output to “nohup. Out” and nohup: ignoring input redirection error to standard output
- [Solved] CUDA initialization: Unexpected error from cudaGetDeviceCount()
- [Solved] Error during WebSocket handshake Unexpected response code 404