Files
oldlinux-files/Ref-docs/manual Bash/abs-guide/abs-guide/secret-pw.sh
2024-02-19 00:21:47 -05:00

23 lines
433 B
Bash

#!/bin/bash
echo
echo -n "Enter password "
read passwd
echo "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 passwd
echo
echo "password is $passwd"
echo
stty echo # Restores screen echo.
exit 0