author:headsen  chen

date : 2019-08-08  11:11:38

notice : 个人原创

 

Ubuntu上运行shell脚本总是报下面这个错误,在centos下面或者mac里面都没有问题

Syntax error: "(" unexpected   shell里面的报错解决

解决办法:更改默认的dash

dpkg-reconfigure dash
Syntax error: "(" unexpected   shell里面的报错解决

这样就调整过来了

原因分析:linux将sh默认指向了dash,而不是bash

相关文章: