secret-pw.sh

来自「Shall高级编程」· Shell 代码 · 共 27 行

SH
27
字号
#!/bin/bash# secret-pw.sh: secret passwordechoecho -n "Enter password "read passwdecho "password is $passwd"echo -n "If someone had been looking over your shoulder, "echo "your password would have been compromised."echo && echo  # Two line-feeds in an "and list."stty -echo    # Turns off screen echo.echo -n "Enter password again "read passwdechoecho "password is $passwd"echostty echo     # Restores screen echo.exit 0# Do an 'info stty' for more on this useful-but-tricky command.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?