diff options
author | Einhard Leichtfuß <alguien@respiranto.de> | 2022-04-29 15:45:26 +0200 |
---|---|---|
committer | Einhard Leichtfuß <alguien@respiranto.de> | 2022-04-29 15:45:26 +0200 |
commit | cd11e4fa81c13aecf84f3b82de568b4b074ac113 (patch) | |
tree | 2b46d2311ea823e7f552eac030eb1cac13097376 | |
parent | ca097e1bf3d901d4f9be51317d01a0410451d345 (diff) |
Use `read' to read multi-line string
(instead of `var=$(cat)')
-rw-r--r-- | general-config.bash | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/general-config.bash b/general-config.bash index d9f62d3..2c0cd6a 100644 --- a/general-config.bash +++ b/general-config.bash @@ -76,14 +76,14 @@ done typeset -A prepare # Does not work for deu-fra-bin, since the index file must stay in sync. -prepare[deu-fra]=\ -'prepare() +read -r -d '' prepare[deu-fra] << 'EOF' ||: +prepare() { cd "$_lang" sed -Ei \ - -e '"'"'s/(10)(10)(100\>)(\s+\(10)(Googol.*(1|Eins) mit einem Googol Nullen)/\1^(\2^\3)\4^\5/'"'"' \ - -e '"'"'s/(10)([1-9][0-9]*)(.*(1|Eins) mit \2 Nullen)/\1\^\2\3/'"'"' \ - -e '"'"'s/(die Zahl 10)(60)/\1^\2/'"'"' \ + -e 's/(10)(10)(100\>)(\s+\(10)(Googol.*(1|Eins) mit einem Googol Nullen)/\1^(\2^\3)\4^\5/' \ + -e 's/(10)([1-9][0-9]*)(.*(1|Eins) mit \2 Nullen)/\1\^\2\3/' \ + -e 's/(die Zahl 10)(60)/\1^\2/' \ "${_lang}.tei" } -' +EOF |