#!/usr/bin/env bash set -o errexit set -o nounset set -o pipefail if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace fi cd "$(dirname "$0")" INPUT="$1" main () { time_record=$(grep Time "${INPUT}" | cut -d : -f 2 | tr -d ' ') distance_record=$(grep Distance "${INPUT}" | cut -d : -f 2 | tr -d ' ') for ((t=1; t