如何使用隐藏密码运行命令

Jos*_*son 2 shell-script curl

我需要运行一个 curl 命令来访问另一个人拥有密码的网站。

例如 curl --basic --user myfriendsname:friendspassword http://www.updateinfo.com

我需要一种方法来启动这个脚本而不能看到我朋友的密码。

phe*_*mer 5

来自man curl

-u, --user <user:password>
  ...
  If you just give the user name (without entering a colon) curl will prompt
  for a password.
  ...
Run Code Online (Sandbox Code Playgroud)

只需将键盘(或screen/tmux共享)传递给他们并让他们输入即可。