From 337084cd6c31450761c784a7fa723875ce2e358f Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Wed, 3 Jun 2015 08:13:29 +0200 Subject: make our invocation of sed GNU and BSD proof --- makecolumns.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/makecolumns.sh b/makecolumns.sh index 0eaf954..8df1c25 100755 --- a/makecolumns.sh +++ b/makecolumns.sh @@ -241,7 +241,8 @@ handle_format_version_3() { [ -f 15_unknown ] && mv 15_unknown 15_Webadresse printf "Normalizing flags ... " - sed -i '' -e s:^1$:00:g -e s:^3$:01:g -e s:^2$:02:g 01_Flags + sed -i.bak -e s:^1$:00:g -e s:^3$:01:g -e s:^2$:02:g 01_Flags + rm 01_Flags.bak printf "done.\n" printf "Normalizing zusaetze ... " @@ -369,7 +370,8 @@ tidy_streetnames () { # Replace any dots at end of line by a single one # finish any str abbreviation without a period with a period - sed -Ei '' 's/\.+/./g;s/(S|s)tr( |:)?$/\1tr./' ${streets} + sed -E -i.bak 's/\.+/./g;s/(S|s)tr( |:)?$/\1tr./' ${streets} + rm "${streets}".bak } # After function definitions, main() can use them -- cgit v1.2.3