ledger/scripts/bal
2004-08-21 06:20:21 -04:00

23 lines
411 B
Bash
Executable file

#!/bin/sh
switch="-c"
limit="-d /^Liabilities/?T<0:(T&AT>{\$100.00})"
if [ "$1" = "-C" -o "$1" = "-U" ]; then
switch="$1"
shift
elif [ "$1" = "-b" -o "$1" = "-e" ]; then
switch="$1 $2"
shift 2
fi
accts="$@"
if [ -z "$accts" ]; then
accts="-Equity -Income -Expenses"
accts="$accts -^Retirement"
accts="$accts -Deposits"
else
limit=""
fi
ledger $switch $limit -s -S "-AT" -V -Q balance $accts