Commit fab1b0fb authored by Spyros Ligouras's avatar Spyros Ligouras

Use dos2unix to fix csv files

parent 19c0b20a
fo_connection.connection_description;fo_span.span_description;fo_span.startlocation_id_A;nameA;geo_latA;geo_lngA;AddressA;typeA;fo_span.endlocation_id_B;nameB;geo_latB;geo_lngB;AddressB;typeB
fo_connection.connection_description;fo_span.span_description;fo_span.startlocation_id_A;nameA;geo_latA;geo_lngA;AddressA;typeA;fo_span.endlocation_id_B;nameB;geo_latB;geo_lngB;AddressB;typeB
Lamda Hellix - Μεταμόρφωση (MED) ;Lamda Hellix - Μεταμόρφωση (MED);1129;lh_koropi;37.8908;23.882;(confidential, exact address and coordinates hidden);ACCESS_OPTICAL;1153;tis_metamorfosi;38.0725;23.7741;Ermou 37, Metamorfosi 144 52;ACCESS_OPTICAL
Synapsecom - Καλοχώρι;Synapsecom - Καλοχώρι R;1471;synapsecom_thess;40.6626;22.8601;Pontou 64, 54628, Menemeni;ACCESS_OPTICAL;1127;vfn_kalochori;40.6539;22.8493;(confidential, exact address and coordinates hidden);DISTRIBUTION
Synapsecom - Καλοχώρι;Synapsecom - Καλοχώρι C;1471;synapsecom_thess;40.6626;22.8601;Pontou 64, 54628, Menemeni;ACCESS_OPTICAL;1127;vfn_kalochori;40.6539;22.8493;(confidential, exact address and coordinates hidden);DISTRIBUTION
......
......@@ -3,6 +3,8 @@
if [ ! -f "$1" ]; then
>&2 echo $0: "$1: No such file"
else
dos2unix "$1"
tail -n +2 "$1" | sed -e "s,\"\",',g" -e "s,\",,g" | awk -F";" '
BEGIN{print "id;name;latitude;longitude;address;type"}
{printf "%s;%s;%s;%s;%s;%s\n", $3, $4, $5, $6, $7, $8}' > temp.csv
......@@ -25,6 +27,8 @@ if [ ! -f nodes.csv ]; then
exit 1
fi
dos2unix nodes.csv
tail -n +2 nodes.csv | awk -F ';' '
BEGIN{
print "{\"type\": \"FeatureCollection\",\"features\": ["
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment