Is there any Linux command one can use to sample subset of a file? For instance, a file contains one million lines, and we want to randomly sample only one thousand lines from that file.
For random I mean that every line gets the same probability to be chosen and none of the lines chosen are repetitive.
tail can pick a subset of the file but not randomly. I know I can always write a python script to do so but just wondering is there a command for this usage.