21 lines
285 B
Bash
21 lines
285 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 "%s" "${prompt}" 1>&2
|
|
read -r -s secret
|
|
echo >&2
|
|
echo "${secret}"
|
|
unset secret
|
|
}
|