Shuf command in linux

Viewed 521

I am confused with how shuf command works with streaming input. Does it buffer the data? Or is there some way of doing this in an online fashion.

1 Answers

This tool reads either a file, or from the linux/unix stdin. There is no streaming.

When you do just do shuf on the command line, you will have to press CTRL-D at some point to tell it "input is complete". Only then the tool starts processing the data.

Related