- cd $DB
- result=$(find . -type d -path "*$1*" | while read ent; do
- [ -e "$ent/passwd" ] || continue
- echo "$ent" | sed 's#^\./##'
- done)
- if [ $(echo "$result" | wc -l) -ne 1 ]; then
- echo "$result"
- exit
- fi
- [ -n "$result" ] || exit 1
- echo $result
- if [ -e "$result"/data ]; then
- echo -n "Associated data: "
- cat "$result"/data
- fi
- perl -ne 'chop and print' "$result"/passwd | cliper clipboard
- echo $(basename "$result") | perl -ne 'chop and print' | cliper primary
+ finder "$1"
+ name=$(recsel -P Name $tmp)
+ echo $name >&2
+ data=$(recsel -P Data $tmp)
+ [ -z "$data" ] || echo "Associated data: $data"
+ echo -n $(recsel -P Passwd $tmp) | cliper clipboard
+ echo -n ${name##*/} | cliper primary