<div dir="ltr">You're right, and you provided me with a nice little (fun) project yesterday. <a href="http://stats.stackexchange.com/questions/245610/not-generating-a-valid-password">I asked a question on the statistics Stack Exchange site</a> about how likely it is for those commands to fail to generate a password of sufficient length. While writing up the question I also tested it. In the 12,000 times I ran the commands only <i>one</i> execution failed to generate a password of less than 32 characters (really, 130 characters). The one failure was actually the 'worst' possible failure – the password was empty! But given a success rate of 11,999 out of 12,000, the commands seem even more likely to be good enough for a lot of cases.<div><br></div><div>Regarding the larger discussion, I think options or settings to specify an external password generator, both as a default and as an argument for generating a specific password, would be both useful and keeping with the relative compactness of Pass's features.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 11, 2016 at 4:41 AM, Kevin Cox <span dir="ltr"><<a href="mailto:kevincox@kevincox.ca" target="_blank">kevincox@kevincox.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 11/11/16 09:26, Henrik Christian Grove wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Den 10-11-2016 kl. 16:14 skrev Kevin Cox:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On Nov 10, 2016 14:43, "Kenny Evitt" <<a href="mailto:kenny.evitt@gmail.com" target="_blank">kenny.evitt@gmail.com</a><br>
<mailto:<a href="mailto:kenny.evitt@gmail.com" target="_blank">kenny.evitt@gmail.com</a>><wbr>> wrote:<br>
<br>
     I then edited "test.txt", inserted a newline between the `4` and<br>
     `5`, and saved the file. I reran the same command as before:<br>
<br>
<br>
Head be default takes 10 lines. So you'll need a couple more newlines.<br>
</blockquote>
By default, yes, but he explicit specifies '-c 10' overriding the<br>
default, and tr will have removed the newlines before head gets them.<br>
Can you actually demonstrate the bug you claim to be there? (I'm not<br>
sure no kind of nastiness can hide in those pipes)<br>
<br>
.Henrik<br>
<br>
PS. The lack of a way to choose passwords without/with only certain<br>
characters is one of the reasons I still haven't switched to pass (using<br>
pwsafe), even though I like the project.<br>
______________________________<wbr>_________________<br>
Password-Store mailing list<br>
<a href="mailto:Password-Store@lists.zx2c4.com" target="_blank">Password-Store@lists.zx2c4.com</a><br>
<a href="http://lists.zx2c4.com/mailman/listinfo/password-store" rel="noreferrer" target="_blank">http://lists.zx2c4.com/mailman<wbr>/listinfo/password-store</a><br>
</blockquote>
<br></div></div>
I'm talking about the first head, not the second. This command gives you 12345 when you expected 12345678.<br>
<br>
echo '12345<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
67890' | head | tr -dc '0-9 | head -c 8 && echo<br>
<br>
A fixed command looks like this (drop the unnecessary head)<br>
<br>
tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<wbr><=>?@[\]^_`{|}~' </dev/random | head -c 32 && echo<div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<wbr>_________________<br>
Password-Store mailing list<br>
<a href="mailto:Password-Store@lists.zx2c4.com" target="_blank">Password-Store@lists.zx2c4.com</a><br>
<a href="http://lists.zx2c4.com/mailman/listinfo/password-store" rel="noreferrer" target="_blank">http://lists.zx2c4.com/mailman<wbr>/listinfo/password-store</a><br>
</div></div></blockquote></div><br></div>