Latest Comments
Social Profile
Search

Entries in programming (1)

Friday
Jul102009

Randomize lines in bash

while read line; do echo "$RANDOM $line"; done < $1 | sort | sed -r "s/^[0-9]+ //" > $2


... sigh... or just
shuf $1 > $2