windows下写了一个shell脚本

02-dos2unix命令与windows编辑shell不可执行问题

在linux下执行

02-dos2unix命令与windows编辑shell不可执行问题

怀疑有奇怪的字符,使用cat -A 你的shell脚本,试试

02-dos2unix命令与windows编辑shell不可执行问题

好像有特殊字符

执行dos2unix relation.sh 试试

02-dos2unix命令与windows编辑shell不可执行问题

看起来没什么变化,我们在linux下执行脚本试试,结果可以

总结:写shell尽量在linux环境下

相关文章:

  • 2021-09-20
  • 2022-12-23
  • 2021-12-23
  • 2021-11-17
  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-18
  • 2021-09-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案