diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2017-01-14 18:33:35 +0100 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2017-01-14 18:33:35 +0100 |
commit | 473fb4add901dad27a9907ad8a3f7bae0d33b319 (patch) | |
tree | 6d377f5e84d12d2ef581ed1595bd92239476574c /har2kml | |
parent | a4fd979196dee88e6b02f1ce5bf4cbfc44874672 (diff) |
Cleanup.
Diffstat (limited to 'har2kml')
-rwxr-xr-x | har2kml | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -23,6 +23,11 @@ har2hosts() { cut -d/ -f3 | sort -u } +kmljoin() { + cat $* | perl -e '$line = ""; while (<>) { $line .= $_; }; $line =~ s%</Document>\s</kml>\s<\?xml version="1.0" encoding="UTF-8"\?>\s<kml xmlns="http://www.opengis.net/kml/2.2">\s<Document>\s<Info>Generated by https://geotraceroute.com</Info>%%gs; $line =~ s%<name>.+</name>%%g; print $line;' + +} + if [ ! -d cache ] ; then mkdir cache ; fi for h in $(har2hosts) ; do @@ -32,5 +37,4 @@ for h in $(har2hosts) ; do fi kmls="$kmls $kml" done - -cat $kmls | perl -e '$line = ""; while (<>) { $line .= $_; }; $line =~ s%</Document>\s</kml>\s<\?xml version="1.0" encoding="UTF-8"\?>\s<kml xmlns="http://www.opengis.net/kml/2.2">\s<Document>\s<Info>Generated by https://geotraceroute.com</Info>%%gs; $line =~ s%<name>.+</name>%%g; print $line;' +kmljoin $kmls |