#!/bin/env bash TIME_SLEEP=$(expr 5 \* 60) while true; do sh start.sh RETN="$?" if [[ $RETN != "0" ]]; then ./transfer.sh "Error return $RETN" fi sleep $TIME_SLEEP done