diff options
author | typebrook <typebrook@gmail.com> | 2019-12-04 17:31:42 +0800 |
---|---|---|
committer | typebrook <typebrook@gmail.com> | 2019-12-05 09:33:11 +0800 |
commit | ba040a3614f2786bc8c4ff951e5663eee871174a (patch) | |
tree | cef724f70864fe826f75fd9f42f2fb497e12b57b /scripts | |
parent | f890ee58d88070f6ec3c4a28e786cd718a28407d (diff) |
update
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/match-road.sh | 6 |
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] |
28 | paste -d' ' \ | 28 | paste -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) |\ |
32 | sed -E 's/ ([^ ]+) ([^ ]+)/ [\1,\2]/' |\ | 32 | sed -E 's/ ([^ ]+) ([^ ]+)/ [\1,\2]/' |\ |
33 | awk '!_[$1]++' > $ORIGIN_DATA | 33 | awk '!_[$1]++' > $ORIGIN_DATA |
34 | 34 | ||