如何以一种工具不会在终端上显示密码的方式读取 bash 脚本中的密码?
(将字体更改为黑底黑字很容易通过复制和粘贴来解决,因此这不是解决方案。)
bash password
有没有办法隐藏我在 shell 中输入的内容,这样终端就不会回显我的击键,同时仍然保留命令的输出?
例如,如果我运行ip addr show,屏幕上唯一的应该是该命令的输出——而不是我输入的“ip addr show”。
ip addr show
command-line shell
如何编写隐藏密码的 Bash 代码或转换为 '*' 用户输入将在字符串中,因此没有空格,并更改或隐藏密码字符串。
linux bash password
bash ×2
password ×2
command-line ×1
linux ×1
shell ×1