Randomly shuffle lines in a file


shuf -o output.txt input.txt

Install coreutils on Mac OS X using Homebrew, if not already installed. Call gshuf instead of shuf.

Advertisements