#! /bin/bash #set -x set -e ACCESS_TOKEN=$(cat ~/settings/tokens/mapbox) LIMIT=10 ORIGIN_DATA=/tmp/origin RESPONSE=/tmp/response # store data of time and location into tmp file with 2 columns, format is like: # 1970-01-01T08:00:46 [121.0179739,14.5515336] paste -d' ' \ <(sed -nr '//,/<\/trk>/ { s/.*