summaryrefslogtreecommitdiff
path: root/new.sh
diff options
context:
space:
mode:
Diffstat (limited to 'new.sh')
-rwxr-xr-xnew.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/new.sh b/new.sh
new file mode 100755
index 0000000..6fb208f
--- /dev/null
+++ b/new.sh
@@ -0,0 +1,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