potty Aspen seedy curt
4 random words are better than one obfuscated word http://xkcd.com/936/ Show Sample Output
This is what I came up to generate XKCD #936 style four-word password. Since first letter of every word is capitalized it looks a bit more readable to my eyes. Also strips single quotes. And yes - regex is a bit of a kludge, but that's the bes i could think of. Show Sample Output
So I use OSX and don't have the shuf command. This is what I could come up with. This command assumes /usr/share/dict/words does not surpass 137,817,948 lines and line selection is NOT uniformly random. Show Sample Output
This does the same thing that the command 'j_melis' submitted, but does it a lot quicker. That command takes 43 seconds to complete on my system, while the command I submitted takes 6 seconds. Show Sample Output
Before running, do: curl -sO http://world.std.com/%7Ereinhold/diceware.wordlist.asc Show Sample Output
Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?
You must be signed in to comment.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for:
echo $(grep "^[^']\{3,5\}$" /usr/share/dict/words|shuf -n4)
Useless use of 'echo'echo $(shuf -n4 /usr/share/dict/words)