From 380b982004e35e14f6b2ad5c5d82f33c6a3c2b4e Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Tue, 5 Feb 2019 17:04:13 +0100 Subject: Add proper tabs in empty koordinaten files --- makecolumns.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/makecolumns.sh b/makecolumns.sh index 2b65307..e10165d 100755 --- a/makecolumns.sh +++ b/makecolumns.sh @@ -316,7 +316,7 @@ handle_format_version_3() { paste 10_Postleitzahl 11_Ort 07_Strasse 08_Hausnummer | map_coords 90_Geokoordinaten_hnr | convert_coords > 16_Koordinaten printf "done.\n" else - tr -dC '\n' < 01_Flags > 16_Koordinaten + sed $'s:.*:\t' 01_Flags > 16_Koordinaten fi if [ -f "${braid}" ]; then @@ -413,6 +413,8 @@ handle_format_version_4() { printf "Looking up geo coordinates for each phonebook entry ... " paste 10_Postleitzahl 07_Strasse | map_coords 91_Geokoordinaten_str | convert_coords > 16_Koordinaten printf "done.\n" + else + sed $'s:.*:\t' 01_Flags > 16_Koordinaten fi rm file_* @@ -432,10 +434,14 @@ handle_format_version_4() { tidy_streetnames () { streets="$1" + printf "Tyding up streetnames ... " + # Replace any dots at end of line by a single one # finish any str abbreviation without a period with a period - sed -E -i.bak 's/\.+/./g;s/(S|s)tr( |:)?$/\1tr./' ${streets} + sed -E -i.bak 's/\.+/./g;s/(S|s)tr( |:)?$/\1tr./;s/ -$/ Str./;s/-$/str./' ${streets} rm "${streets}".bak + + printf "done.\n" } # JOT -- cgit v1.2.3