summaryrefslogtreecommitdiff
path: root/vsvs-sum
diff options
context:
space:
mode:
Diffstat (limited to 'vsvs-sum')
-rw-r--r--vsvs-sum10
1 files changed, 6 insertions, 4 deletions
diff --git a/vsvs-sum b/vsvs-sum
index faeaa16..1684dd8 100644
--- a/vsvs-sum
+++ b/vsvs-sum
@@ -14,14 +14,16 @@ do
if [ -z "${key}" ]
then
buf="${buf}"$'\n'"${val}"
- elif [ -n "${buf}" ]
- then
- res="$(echo -n "${buf}" | $1 "${res}")"
+ else
+ if [ -n "${buf}" ]
+ then
+ res="$(echo -n "${buf}" | $1 "${res}")"
+ fi
buf="${val}"
fi
done
if [ -n "${buf}" ]
+then
res="$(echo -n "${buf}" | $1 "${res}")"
- buf="${val}"
fi
echo -n "${res}"