fix ripple.sh to work reasonably with high-output scripts