I have a
zsh script that prompts for keyboard entry:
read -rs 'pw?Password: '
This script also needs to read the contents of a file from stdin. But the
read command takes the first line of stdin and uses it as input for the password:
myscript <<< 'line1\nline2' # pw == 'line1'
Any way to get around this? I'd prefer a
bash solution, though I'm open to others too.
gpg2 does this, so I know it's possible... just don't know how.)