Why will script work with /bin/bash but not /bin/sh?

前端 未结 2 2066
隐瞒了意图╮
隐瞒了意图╮ 2021-01-17 03:13

I am trying to understand why the script will work with #!/bin/bash but not #!/bin/sh. I am running Cygwin and both sh.exe and b

2条回答
  •  轮回少年
    2021-01-17 03:47

    Despite being same file, shell analyzes its own name when run and switches to either plain shell or bash mode.

提交回复
热议问题