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
Written by Stephen Blankenship
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#