X-Git-Url: http://git.plutz.net/?p=cgilite;a=blobdiff_plain;f=storage.sh;h=7f70e6480d6c89c8a32d3a9ee3fb68a5bfcc35b6;hp=d84f0c26d6529ddbbf5555de53902e96b23eedc5;hb=f0383eeb634ce1ae71bfb409a9bc25d84b6d79e9;hpb=0d6196d34eed576738a7ca4f4f40f240503b1d96 diff --git a/storage.sh b/storage.sh index d84f0c2..7f70e64 100755 --- a/storage.sh +++ b/storage.sh @@ -91,7 +91,7 @@ STRING(){ " "*) out="${out}\\t"; in="${in# }" ;; +*) out="${out}\\+"; in="${in#+}" ;; " "*) out="${out}+"; in="${in# }" ;; - *) out="${out}${in%%[\\${CR}${BR} + ]*}"; in="${in#${in%%[\\${BR}${CR} + ]*}}" ;; + *) out="${out}${in%%[\\${CR}${BR} + ]*}"; in="${in#"${in%%[\\${BR}${CR} + ]*}"}" ;; esac; done printf '%s' "$out" } @@ -122,7 +122,7 @@ UNSTRING(){ \\+) out="${out}+"; in="${in#\\+}" ;; +*) out="${out} "; in="${in#+}" ;; \\*) in="${in#\\}" ;; - *) out="${out}${in%%[\\+]*}"; in="${in#${in%%[\\+]*}}" ;; + *) out="${out}${in%%[\\+]*}"; in="${in#"${in%%[\\+]*}"}" ;; esac; done printf '%s' "$out" }