#!/bin/bash -x

ITERATION=1
RESULT_CODE=0
while [ "$RESULT_CODE" -eq 0 ]
do
  echo "Iteration: $ITERATION"
  eval "$@"
  RESULT_CODE=$?
  ITERATION=$((ITERATION+1))
done
