Tag Archives: syntax error: “(” unexpected “)

[Solved] The Shell Script error: syntax error: “(” unexpected “)

Execute the shell script with the following error messages

This is related to the version of shell you actually use. It can be printed with LS - L/bin/*sh, for example:

Here, SH is redirected to dash, so if sh positionpara.Sh, dash is used. There are many ways to avoid error reporting, such as executing bash positionpara.Sh, or executing ./positionpara.Sh .