例如shell脚本在centos系统中能正常执行,而在ubuntu系统中执行会出现类似Syntax error: "(" unexpected的错误,一般这种是因为sh与bash有些地方不兼容,解决方式:

  1.执行bash xx.sh

  2.执行chmod +x xx.sh对shell脚本赋予执行权限,之后执行./xx.sh

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-06
猜你喜欢
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
  • 2021-09-26
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案