File: bal

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 (21 lines) | stat: -rwxr-xr-x 359 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

switch="-c"
limit="-t (/Liabilities/?a<0:Ua>100)&a"

if [ "$1" = "-C" -o "$1" = "-U" ]; then
  switch="$1"
  shift
elif [ "$1" = "-b" -o "$1" = "-e" -o "$1" = "-p" ]; then
  switch="$1 $2"
  shift 2
fi

accts="$@"
if [ -z "$accts" ]; then
  accts="-Equity -Income -Expenses"
else
  limit=""
fi

ledger -VQ $switch $limit -s -S "-UT" balance $accts