Date: Mon, 4 Feb 2008 16:20:06 +0100 (CET) From: Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl> To: freebsd-questions@freebsd.org Subject: bash bug - or what? Message-ID: <20080204161647.V8347@wojtek.tensor.gdynia.pl>
next in thread | raw e-mail | index | archive | help
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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080204161647.V8347>