csvtk
csvtk copied to clipboard
Shuffle rows: csvtk shuf /or/ csvtk sort -R
I want to randomly re-order the rows in my CSV file.
Basically unix shuf or sort -R but for xSV data.
The actual use case is to shuffle the data before using csvtk uniq -n 40 say.
Is this possible?
shuf has feature -n to output only N rows, very important for taking a sample out of a big file.
Has this been implemented into csvtk? Or is it a matter of piping into shuf? If so, how can we skip the header line from the shuffling? Thanks in advance.
Not yet, it should be easy.