Closed malamoureux closed 4 years ago
I would like to poll the hostname of device and use as variable to name the note. I've attempted to format in several ways but am unable to get the desired results. Is it possible to use a variable to complete the name field?
Thanks in advance.
DEVICE=$(hostname) \ echo "SSH passhprase? "; read passhprase; \ printf "Private Key: %s\nPublic Key: %s"\ "$(cat ~/.ssh/id_rsa.pub)" | \ lpass add --non-interactive \ --sync=now "${passhprase}" \ --note-type=ssh-key \ Shared-SSH_Keys/"${DEVICE}"
Returns..
Usage: lpass add [--sync=auto|now|no] [--non-interactive] [--color=auto|never|always] {--username|--password|--url|--notes|--field=FIELD|--note-type=NOTETYPE} NAME
I would like to poll the hostname of device and use as variable to name the note. I've attempted to format in several ways but am unable to get the desired results. Is it possible to use a variable to complete the name field?
Thanks in advance.
DEVICE=$(hostname) \ echo "SSH passhprase? "; read passhprase; \ printf "Private Key: %s\nPublic Key: %s"\ "$(cat ~/.ssh/id_rsa.pub)" | \ lpass add --non-interactive \ --sync=now "${passhprase}" \ --note-type=ssh-key \ Shared-SSH_Keys/"${DEVICE}"
Returns..
Usage: lpass add [--sync=auto|now|no] [--non-interactive] [--color=auto|never|always] {--username|--password|--url|--notes|--field=FIELD|--note-type=NOTETYPE} NAME