our/cmds/count

10 lines
165 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
DIR=$(dirname -- $0)
DATA="$DIR/data/count"
old_number=$(cat "$DATA")
new_number=$((old_number + 1))
echo $new_number > $DATA
echo $new_number