21 lines
280 B
Bash
21 lines
280 B
Bash
not() {
|
|
case "${1}" in
|
|
"false") echo "true" ;;
|
|
"true") echo "false" ;;
|
|
*) ;;
|
|
esac
|
|
}
|
|
|
|
read_passphrase() {
|
|
read_secret "PassPhrase: "
|
|
}
|
|
|
|
read_secret() {
|
|
local prompt="${1}"
|
|
local secret
|
|
printf "${prompt}" 1>&2
|
|
read -r -s secret
|
|
echo >&2
|
|
echo "${secret}"
|
|
unset secret
|
|
}
|