<div dir="ltr">On OS X:<div>% cat foo.sh<div>#!/bin/bash</div><div><br></div><div>read -r -N 32 p < <(tr -dc '[:graph:]' < /dev/random)</div><div>echo "$p"</div><div>% ./foo.sh</div><div>./foo.sh: line 3: read: -N: invalid option</div><div>read: usage: read [-ers] [-u fd] [-t timeout] [-p prompt] [-a array] [-n nchars] [-d delim] [name ...]</div><div>% sed -i .bak s/-N/-n/ foo.sh</div><div>% ./foo.sh</div><div>tr: Illegal byte sequence</div><div>y*K</div><div>% which tr</div><div>/usr/bin/tr</div><div><br></div><div>So definitely need to move to -n for read, but the system tr on OS X is unamused by this idea.</div><div><br></div><div>Kevin</div><br><div class="gmail_quote"><div dir="ltr">On Sun, Dec 18, 2016 at 3:21 PM Jason A. Donenfeld <<a href="mailto:Jason@zx2c4.com">Jason@zx2c4.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi list,<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://git.zx2c4.com/password-store/commit/?id=f2a6078885c61040737c602a99ee75ba8009f17f" rel="noreferrer" class="gmail_msg" target="_blank">https://git.zx2c4.com/password-store/commit/?id=f2a6078885c61040737c602a99ee75ba8009f17f</a><br class="gmail_msg">
<br class="gmail_msg">
Any criticism of this? I'll revert this if there's good reason to<br class="gmail_msg">
revert it. Otherwise, after thinking about this for only 40 seconds, I<br class="gmail_msg">
think it's an improvement.<br class="gmail_msg">
<br class="gmail_msg">
I've CC'd Corentin on this email, who's an expert at password generation.<br class="gmail_msg">
<br class="gmail_msg">
Jason<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
Password-Store mailing list<br class="gmail_msg">
<a href="mailto:Password-Store@lists.zx2c4.com" class="gmail_msg" target="_blank">Password-Store@lists.zx2c4.com</a><br class="gmail_msg">
<a href="https://lists.zx2c4.com/mailman/listinfo/password-store" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.zx2c4.com/mailman/listinfo/password-store</a><br class="gmail_msg">
</blockquote></div></div></div>