summaryrefslogtreecommitdiff
path: root/tests/dev/cgd/h_countkey.sh
blob: a229c140f7f7f11647fe1f5f2a781e8bd0581b3f (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

set -Ceu

n=$(cat "$1" 2>/dev/null || echo 0)
n=$((n + 1))
echo $n >"$1".tmp
mv -f "$1".tmp "$1"
shift

echo ${1+"$@"} | base64 -d