On Wed, Oct 26, 2011, Han Boetes wrote: > I have this nice password generator which I use on my work, mostly > linux based: > > < /dev/urandom tr -dc "[:graph:]" | head -c 12; echo > > Of course this isn't portable so I rewrote it to: > > < /dev/arandom tr -dc "[:graph:]" | iconv -c -t ASCII | dd count=1 bs=12 > 2> /dev/null; echo > > Now you may look at it and wonder what's the 'iconv -c -t ASCII |' > is doing in there. If you remove it you'll notice weird characters > slipping through.
Actually, I don't. Do you have an example of a weird character being let through? > > Is that right? Why does that happen? If I look at the tr code it > should only allow ascii chars without whitespace from my limited > understanding of C. > > > # Han
