Install shuf on OS X

command line

Ubuntu Linux has a great tool called shuf, which works like head except that it gives you ten random lines. I couldn't find it on Homebrew. What is the simplest way of installing it on OS X?

Best Answer

You can install coreutils with brew install coreutils.

shuf will be linked as gshuf. Read the caveats when you install coreutils.

Related Question