r/ProgrammerTIL • • Sep 19 '17

Other TIL Unix-based systems provide a dictionary of 235k+ newline-separated words in /usr/share/dict/words

This list can be copied between projects and used for everything from Scrabble board-playing AIs to spellcheckers to regex golfing playgrounds!

119 Upvotes

26 comments sorted by

View all comments

Show parent comment

6

u/DonaldPShimoda Sep 20 '17

shuf

Never seen this before. Neat! Too bad it's not in macOS by default. :(

10

u/onyxleopard Sep 20 '17

It's part of GNU coreutils (will be installed as gshuf if you brew install coreutils).

3

u/DonaldPShimoda Sep 20 '17

Oh! Then I do have it haha. Thanks for the pointer!

3

u/FUZxxl Sep 20 '17

On macOS, use sort -R for shuffling.

1

u/DonaldPShimoda Sep 20 '17

Nifty! Thanks for the tip!