#!/bin/sh d="`mktemp -d`" cd "$d" smbclient -k '\\cerndfs.cern.ch\dfs' -D '/Departments/GS/Groups/AIS/Sections/PM' -c 'get ais-pm-passwords.kdbx' kpcli --kdb ais-pm-passwords.kdbx cd "$HOME" rm -rvf "$d"