我想用密码保护程序的执行。
我如何在bash中这样做?
谢谢
- stty_orig=`stty -g` # save original terminal setting.
- stty -echo # turn-off echoing.
- read passwd # read the password
- stty $stty_orig # restore terminal setting.
我如何在bash中这样做?
谢谢
- stty_orig=`stty -g` # save original terminal setting.
- stty -echo # turn-off echoing.
- read passwd # read the password
- stty $stty_orig # restore terminal setting.