Last Updated: February 25, 2016
·
452
· stephenb

Bash 1-liner to randomize lines in a csv/text file

for i in `cat file-name.csv`; do echo "$RANDOM>> $i"; done | sort | sed -E 's/^[0-9]+\>\> //' > randomized.csv