diff options
-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}" |