#!/bin/bash if [ -z "$1" ] then timeout=60 else timeout=$1 fi aerofs-sh pause for (( i=0; i<$timeout; i++ )) do echo -e '\033[1A' left=$(( $timeout - $i )) read -t 60 -n 1 -s -p "Pausing for $left min Abort? [anykey] " input if [ $? -eq 0 ] then break fi done aerofs-sh resume