From 50cd61a16ffb803bcb53d21ab880843553b95cdb Mon Sep 17 00:00:00 2001 From: hs7n22 <hs7n22@southampton.ac.uk> Date: Thu, 16 Mar 2023 15:27:53 +0000 Subject: [PATCH] Delete create_csv.sh --- create_csv.sh | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 create_csv.sh diff --git a/create_csv.sh b/create_csv.sh deleted file mode 100644 index f34952f..0000000 --- a/create_csv.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -#First set 2 variable that extract from kml and save as csv - -kml_input_path=$1 -csv_output_path=$2 - -echo"Timestamp,Latitude,Longitude,MinxsealevePressure,MaxIntensity" > $2 - -echo "Converting report.kml -> storm_info.csv..." - -#Second have 5 kml data and get the information we care about with unit - -lat=$(grep "<lat>" $1 | cut -d ">" -f 2 | cut -d "<" -f 1 | sed "s/$/N/g" >lat.txt) -lon=$(grep "<lon>" $1 | cut -d ">" -f 2 | cut -d "<" -f 1 | sed "s/$/W/g" >lon.txt) -inte=$(grep "<intensity>" $1 | cut -d ">" -f 2 | cut -d "<" -f 1 | sed "s/$/$ Knots/g" > inten.txt) -press=$(grep "<minSea.*>" $1 | cut -d ">" -f 2 | cut -d "<" -f 1 | sed "s/$/& mb/g" > press.txt) -tim=$(grep "<lat>" $1 | cut -d ">" -f 2 | cut -d "<" -f 1 > ts.txt) - -#Third sort data, outupt it aas a csv file -echo "$timestamp,$lat,$lon,$pressure,$intensity" >>$2 - -echo "Done!" - -- GitLab