File: entry

package info (click to toggle)
ledger 3.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,964 kB
  • sloc: cpp: 39,393; python: 4,476; perl: 1,309; sh: 477; lisp: 435; yacc: 103; makefile: 58
file content (16 lines) | stat: -rwxr-xr-x 283 bytes parent folder | download | duplicates (8)
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