How can I pipe an output of a command just in case it returns true?
function open { TEMPFILE=$(mktemp -u) if ! gpg2 --quiet --decrypt --batch --passp
The following code should conditionally pipe the result if the file opens successfully:
result=open "$@" "$PASSWORD" if [ $? -gt 0 ]; then exit 1 fi echo "$result" |