From 49b4c44fb341804acf0165105e2234c2e57d1a67 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Sat, 13 Feb 2021 22:27:50 +0100 Subject: [PATCH] remove obsolte escape functions --- storage.sh | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/storage.sh b/storage.sh index a8484b0..82d3d77 100755 --- a/storage.sh +++ b/storage.sh @@ -67,20 +67,11 @@ RELEASE(){ fi } -STRING=' - s;\\;\\\\;g; - s;\n;\\n;g; - s;\t;\\t;g; - s;\r;\\r;g; - s;\+;\\+;g; - s; ;+;g; -' - -STRING_OLD(){ - { [ $# -eq 0 ] && cat || printf %s "$*"; } \ - | sed -E ':X; $!{N;bX;}'"$STRING" -} - +# STRING=' +# s;\\;\\\\;g; s;\t;\\t;g; +# s;\n;\\n;g; s;\r;\\r;g; +# s;\+;\\+;g; s; ;+;g; +# ' STRING(){ local in out='' [ $# -gt 0 ] && in="$*" || in="$(cat)" @@ -96,7 +87,6 @@ STRING(){ printf '%s' "$out" } - UNSTRING=' :UNSTRING_X s;((^|[^\\])(\\\\)*)\\n;\1\n;g; @@ -107,10 +97,6 @@ UNSTRING=' s;((^|[^\\])(\\\\)*)\\\+;\1+;g; s;\\\\;\\;g; ' -UNSTRING_OLD(){ - { [ $# -eq 0 ] && cat || printf %s "$*"; } \ - | sed -E "$UNSTRING" -} UNSTRING(){ local in out='' [ $# -gt 0 ] && in="$*" || in="$(cat)" -- 2.39.2