From 473fb4add901dad27a9907ad8a3f7bae0d33b319 Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Sat, 14 Jan 2017 18:33:35 +0100 Subject: Cleanup. --- har2kml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'har2kml') diff --git a/har2kml b/har2kml index 174a1e8..614d84a 100755 --- a/har2kml +++ b/har2kml @@ -23,6 +23,11 @@ har2hosts() { cut -d/ -f3 | sort -u } +kmljoin() { + cat $* | perl -e '$line = ""; while (<>) { $line .= $_; }; $line =~ s%\s\s<\?xml version="1.0" encoding="UTF-8"\?>\s\s\sGenerated by https://geotraceroute.com%%gs; $line =~ s%.+%%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%\s\s<\?xml version="1.0" encoding="UTF-8"\?>\s\s\sGenerated by https://geotraceroute.com%%gs; $line =~ s%.+%%g; print $line;' +kmljoin $kmls -- cgit v1.2.3