当我想在bash脚本中要求输入密码时,我会这样做:
bash
read -s
...但是当我bash在 POSIX 模式下运行时sh,该-s选项被拒绝:
sh
-s
$ read -s sh: 1: read: Illegal option -s
如何使用符合 POSIX 的命令安全地请求输入?
shell scripting password posix
password ×1
posix ×1
scripting ×1
shell ×1