开发者

Ensuring shell script is being executed by BASH (not csh, ksh, sh etc.)

开发者 https://www.devze.com 2023-01-20 17:27 出处:网络
How woul开发者_StackOverflowd you exit-gracefully-upon-entry when invoking a .sh script from anything other than bash?Make the script executable and prepend:

How woul开发者_StackOverflowd you exit-gracefully-upon-entry when invoking a .sh script from anything other than bash?


Make the script executable and prepend:

#!/usr/bin/env bash
0

精彩评论

暂无评论...
验证码 换一张
取 消