#!/bin/sh # getpw -- read password trap 'stty echo; echo; exit 130' INT printf 'Enter password: ' > /dev/tty stty -f /dev/tty -echo read PASSWORD < /dev/tty stty -f /dev/tty echo echo > /dev/tty echo "$PASSWORD"