diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2020-12-03 15:39:23 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2020-12-03 15:39:23 +0300 |
commit | 56079f9e4ab71145d095c5a7ba0ecdea7be1128d (patch) | |
tree | 966ea76e25de821fab894c2dc5c003648922d15e | |
parent | e82157e5418706f4a39476e6e37389b7b1c7c883 (diff) | |
download | vsvs-56079f9e4ab71145d095c5a7ba0ecdea7be1128d.tar vsvs-56079f9e4ab71145d095c5a7ba0ecdea7be1128d.tar.xz vsvs-56079f9e4ab71145d095c5a7ba0ecdea7be1128d.zip |
.
-rw-r--r-- | vsvs-map | 6 | ||||
-rw-r--r-- | vsvs-sum | 6 |
2 files changed, 10 insertions, 2 deletions
@@ -14,9 +14,13 @@ do if [ -z "${key}" ] then buf="${buf}"$'\n'"${val}" - else + elif [ -n "${buf}" ] res="${res}$(echo -n "${buf}" | $1)" buf="${val}" fi done +if [ -n "${buf}" ] + res="${res}$(echo -n "${buf}" | $1)" + buf="${val}" +fi echo -n "${res}" @@ -14,9 +14,13 @@ do if [ -z "${key}" ] then buf="${buf}"$'\n'"${val}" - else + elif [ -n "${buf}" ] res="$(echo -n "${buf}" | $1 "${res}")" buf="${val}" fi done +if [ -n "${buf}" ] + res="$(echo -n "${buf}" | $1 "${res}")" + buf="${val}" +fi echo -n "${res}" |