On Friday, April 2, 2021 10:43 AM, Max Görner 
<[email protected]> wrote:

> A solution would be to be `yes`:
>
> $ PASS="super-secure"
> $ yes "${PASS}" | pass insert my_pass
>
> I hope this helps.

Thank you Max.

So, now I know that it is possible, and there are 2 ways to do this:

$ PASS="super-secure-1"
$ yes "${PASS}" | pass insert my_pass > /dev/null 2>&1
$ pass my_pass
super-secure-1
$ PASS="super-secure-2"
$ echo "${PASS}" | pass insert -m my_pass > /dev/null 2>&1
$ pass my_pass
super-secure-2

Note that I am using "> /dev/null 2>&1" to suppress extra empty lines in the 
output.

Regards,
Valera Rozuvan

Reply via email to