summaryrefslogtreecommitdiff
path: root/vsvs-sum
diff options
context:
space:
mode:
Diffstat (limited to 'vsvs-sum')
-rw-r--r--vsvs-sum6
1 files changed, 5 insertions, 1 deletions
diff --git a/vsvs-sum b/vsvs-sum
index f861e0f..4c67fe1 100644
--- a/vsvs-sum
+++ b/vsvs-sum
@@ -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}"