#!/bin/bash function sig_hander_ERR { echo "some error occured" exit 1 } trap sig_hander_ERR ERR if [ "x$1" = "x" ]; then echo "arg required" exit 1 fi LINE=`gpg -q -d ~/.pwman.db | xsltproc /home/rsnel/src/pwman.nosuck/pwmandb2csv.xsl - | grep -e "$1" | head -n 1` PASSWORD=`echo $LINE | cut -d ';' -f 3` echo -n $PASSWORD | xclip -w 2500 -selection clipboard -quiet