Monday, April 18, 2016
Saturday, April 16, 2016
Friday, April 15, 2016
Wednesday, April 13, 2016
OS X: Bash: Generating Random English Word
Command:
$ wcount=$[`wc -l < /usr/share/dict/words`];fromhead=$[$wcount - 1];random=$[`jot -r 1 0 $fromhead`];head -$[$random] /usr/share/dict/words | tail -1
Result:
everywhereness
Explaination:
Dictionary used: /usr/share/dict/words
Generating random line number: jot command
$ wcount=$[`wc -l < /usr/share/dict/words`];fromhead=$[$wcount - 1];random=$[`jot -r 1 0 $fromhead`];head -$[$random] /usr/share/dict/words | tail -1
Result:
everywhereness
Explaination:
Dictionary used: /usr/share/dict/words
Generating random line number: jot command
ラベル:
Bash (Unix shell),
Dictionary,
Randomness,
Word,
ランダム,
語,
辞典
Tuesday, April 12, 2016
Sunday, April 10, 2016
Subscribe to:
Posts (Atom)