[pass] [PATCH] generate only first line (correction)

Jason A. Donenfeld Jason at zx2c4.com
Tue May 6 15:59:40 CEST 2014


zx2c4 at thinkpad ~ $ cat replacement-test.sh
#!/bin/sh

password="$(pwgen -s -y 900 1)"
oldfile=$'this is\nthe old file\nwith various\nnew lines\nand whatnot\n'
[[ $password == "$(sed $'1c \\\n'"$(sed 's/[\/&]/\\&/g'
<<<"$password")"$'\n' <<<"$oldfile" | head -n 1)" ]] && echo "It works!"
zx2c4 at thinkpad ~ $ ./replacement-test.sh
It works!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20140506/2f2eb7ac/attachment.html>


More information about the Password-Store mailing list