echo "Testing..." SLEEPMAX=1 for var in $@ do sleep $var & if (( $var > $SLEEPMAX )); then SLEEPMAX=$var fi done sleep "$SLEEPMAX" echo "Done."