blob: e3560f6f8ee6c023308aad9b3723c76d81c2b41e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/usr/bin/env zsh
SHUF=$(which shuf)
if [[ $? -ne 0 ]]; then
SHUF=$(which gshuf)
if [[ $? -ne 0 ]]; then
echo "no `shuf` found, exiting"
exit
fi
fi
F=$(mktemp /tmp/bishuf.XXXXXX)
echo 42 > $F
$SHUF --random-source=$F $1 > $1.shuf
$SHUF --random-source=$F $2 > $2.shuf
rm $F
|