#!/bin/rc # shuf - shuffle input lines # usage: shuf < input > output ifs=' ' fn sigexit{ rm -f /tmp/shuf.$pid } for(line in `{cat /fd/0}){ for(i in 1 2 3) awk '{printf("%d", substr($2,19)) }' /dev/time echo @@@$line } >>/tmp/shuf.$pid sort -n /tmp/shuf.$pid | sed 's/^[0-9]+@@@//' >/fd/1 exit # force clean up