summaryrefslogtreecommitdiff
path: root/new.sh
blob: 6fb208f19ff41d4e7b29ee6c180b79404192a9e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

test -f .current || echo -n 1 > .current

current=$(cat .current)

if test $# -eq 2
then
	echo "$current. $1" >> open
else
	echo "$current. " >> open
	vim open
fi
echo -n "$((current + 1))" > .current