blob: ef1869dafd3cb080d9415c827df894f0f5cd6392 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/bin/sh
if [ -z "$LEDGER" -o ! -r "$LEDGER" ]; then
echo Please set your LEDGER environment variable.
fi
line=`wc -l $LEDGER | awk '{print $1}'`
if ledger xact "$@" > /tmp/xact; then
cat /tmp/xact >> $LEDGER
else
echo "$@" >> $LEDGER
fi
rm /tmp/xact
vi +$line $LEDGER
|