look at this

$SORT is sort -S 512m

$tmp2  is input filename (being 2GB size), $tmp3 is output

this fragment tries (with success) to randomize lines from $tmp2 and write it to $tmp3

while read ll;do
 echo $RANDOM $RANDOM $ll
done <$tmp2 | $SORT |cut -f 3- -d " " >$tmp3



this works but why bash sucks VM space?

69274 test              1  -8    0  1862M 98008K pipewr 1   8:17 40.28% bash


this 1862 is growing until it finishes, resident size is 100M because it gets swapped out.


it looks like echo'ed data is kept in bash memory

what's wrong?
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to