[pass] [passmenu]: Complicated way for first line?

Lucas Hoffmann l-m-h at web.de
Fri Feb 5 22:39:55 CET 2016


Quoting Jason A. Donenfeld (2016-02-05 22:21:49)
> Merging this just for you. :-P
> ...
>     So, instead use two processes! One for getting the first line and one
>     for removing the trailing line. Everybody loves more calls to fork(),
>     right?

Or use builtins:
pass show "$password" | read foo; prinf %s "$foo" | xdotool ...

(On my machine f runs about 40 times faster than g:
f () { local foo; read foo < "$1"; printf %s "$foo"; }
g () { head -n 1 "$1" | tr -d '\n\r'; }
)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: signature
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20160205/3ecbeed5/attachment.asc>


More information about the Password-Store mailing list