Ubuntu 执行 bash 脚本异常
执行报错
[dev@my-ubuntu ~/packages/base_server_install_operation/bin]$ sh install_service.sh
/home/dev/packages/base_server_install_operation/exe_script/set_all_conf_for_mongo.sh: 5: Syntax error: "(" unexpected (expecting "}")
install_service.sh: 116: [[: not found
install_service.sh: 118: [[: not found
install_service.sh: 157: export: 7002: bad variable name
解决办法
1. sudo dpkg-reconfigure dash
2. 选择 no -- 即可执行 sh xxx.sh