View on GitHub

Devendra's Log

Randomly shuffle lines in a file

shuf -o output.txt input.txt

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