I see people asking for pool fallback a bunch... Maybe someone else will find this useful. *shrug*

#!/usr/bin/env bash
pools=(
"--url=stratum+tcp://mine.Hashbros.co.in:3333 --userpass=worker.name:x --retries=3 --algo=scrypt -l Y7x32 -C 1 -i 0 -m 0 -H 1"
"--url=stratum+tcp://middlecoin.com:3333 --userpass=15wcm1ZxixUjjq3tKEoKT55qLttoCN2TBY:x --retries=3 --time-limit=3600 --algo=scrypt -l Y7x32 -C 1 -i 0 -m 0 -H 1"
)
while true; do
for i in $(seq 0 $((${#pools[*]} - 1))); do
./cudaminer ${pools[$i]}
echo "Restarting in 3... CTRL-C to stop."; sleep 3
done
done
In English: Mine on hashbros until there's a connection issue. At that point, switch to middlecoin for an hour. Repeat ad nauseam.