#!/u/bin/bsh
#Test-Script für quicksort()
echo rand.txt
> rand.txt
to 25000 repeat
do
echo $RANDOM%n$RANDOM%n$RANDOM%n$RANDOM%n$RANDOM
echo $RANDOM%n$RANDOM%n$RANDOM%n$RANDOM%n$RANDOM
done
><
echo "rand.txt-->rand.int"
< rand.txt
> rand.int
while readl num
do
base -10 num +l
done
><<
echo "rand.int-->quicksort()-->rando.int"
qs < rand.int > rando.int
echo "rando.int-->rando.txt"
offs=0
< rando.int
> rando.txt
while catv $offs,4,0 =num:
do
base -l num +10
let "offs+=4"
done
><<
echo rand.txt:sort:randoo.txt
sort -b -n < rand.txt > randoo.txt
#rando.txt::randoo.txt vergleichen |