Friday
Jul102009
Randomize lines in bash
Friday, July 10, 2009 at 12:50PM while read line; do echo "$RANDOM $line"; done < $1 | sort | sed -r "s/^[0-9]+ //" > $2
... sigh... or just
shuf $1 > $2
Read this review post
Read this review post
Friday, July 10, 2009 at 12:50PM while read line; do echo "$RANDOM $line"; done < $1 | sort | sed -r "s/^[0-9]+ //" > $2
shuf $1 > $2