dotfiles/.bin/pass-add

20 lines
296 B
Plaintext
Raw Normal View History

2023-02-22 08:31:38 +01:00
#/bin/sh
if [ -z "$2" ]; then
echo "Usage: pass-add Folder/page.de username"
exit 2
fi
_file="${1}"
_login="${2}"
_password="$(pwgen -syn -r "{}'\\§()°\`|[]\";" 16 1)"
{
echo "$_password";
echo "login: $_login";
} | pass insert -m "${_file}"
echo "======="
pass "${_file}"