#!/bin/bash
for i in `seq -w 0 21`; do
        echo $i
        f=potent0$i
        limit=`tail -1 potent/$f.fg | awk '{print $4}'`
        if [ -e /tmp/$f.dat ]; then
            echo /tmp/$f.dat exists
        else
            ./errorbounds5 --filename potent/$f.fg --maxnodes 5000 --debug true --limit $limit --methods BP Cav SAW BoundProp > /tmp/$f.dat
        fi
done
