aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/match-road.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/match-road.sh b/scripts/match-road.sh
index 01fa888..68d7c8a 100755
--- a/scripts/match-road.sh
+++ b/scripts/match-road.sh
@@ -26,9 +26,9 @@ RESPONSE=/tmp/response
26# store data of time and location into tmp file with 2 columns, format is like: 26# store data of time and location into tmp file with 2 columns, format is like:
27# 1970-01-01T08:00:46 [121.0179739,14.5515336] 27# 1970-01-01T08:00:46 [121.0179739,14.5515336]
28paste -d' ' \ 28paste -d' ' \
29 <(sed -nE '/<trk>/,/<\/trk>/ { s/.*<time>(.*)<\/time>/\1/p }' $1 | cut -d'.' -f1) \ 29 <(sed -nE '/<trk>/,/<\/trk>/ s/.*<time>(.*)<\/time>/\1/p' $1 | cut -d'.' -f1) \
30 <(sed -nE 's/.*lon=\"([^\"]+)\".*/\1/p' $1) \ 30 <(sed -nE '/<trk>/,/<\/trk>/ s/.*lon=\"([^\"]+)\".*/\1/p' $1) \
31 <(sed -nE 's/.*lat=\"([^\"]+)\".*/\1/p' $1) |\ 31 <(sed -nE '/<trk>/,/<\/trk>/ s/.*lat=\"([^\"]+)\".*/\1/p' $1) |\
32sed -E 's/ ([^ ]+) ([^ ]+)/ [\1,\2]/' |\ 32sed -E 's/ ([^ ]+) ([^ ]+)/ [\1,\2]/' |\
33awk '!_[$1]++' > $ORIGIN_DATA 33awk '!_[$1]++' > $ORIGIN_DATA
34 34