Skip to content

Instantly share code, notes, and snippets.

@imjeen
imjeen / enter_password.sh
Created November 22, 2019 09:16
Enter password width asterisk (*) on the fly
#!/usr/bin/env sh
$USER="anonymous"
echo
unset password
prompt="Please input the $USER's Password: "
while IFS= read -p "$prompt" -r -s -n 1 char
do
if [[ $char == $'\0' ]] ; then