#!/bin/bash #Unlock pass - clever version #On ecryptfs PASS_FILE=~/.mutt/passwords_decrypted #PASS_FILE="/dev/shm/$USER-mutt-pass" #ENC_PASS_FILE=~/.mutt/passwords.gpg if [ ! -s $PASS_FILE ]; then umask 077 gpg -d $ENC_PASS_FILE > $PASS_FILE fi cat $PASS_FILE | grep $1 | cut -d"=" -f2