changes to bal script
This commit is contained in:
parent
ba0a928883
commit
9f5cb900e5
1 changed files with 7 additions and 10 deletions
17
scripts/bal
17
scripts/bal
|
|
@ -1,26 +1,23 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
switch=""
|
switch="-c"
|
||||||
current="-c"
|
limit="-d /^Liabilities/?T<0:(T&AT>{\$100.00})"
|
||||||
limit="-l \$50"
|
|
||||||
|
|
||||||
if [ "$1" = "-C" -o "$1" = "-U" -o "$1" = "-P" ]; then
|
if [ "$1" = "-C" -o "$1" = "-U" ]; then
|
||||||
switch="$1"
|
switch="$1"
|
||||||
shift
|
shift
|
||||||
elif [ "$1" = "-b" -o "$1" = "-e" ]; then
|
elif [ "$1" = "-b" -o "$1" = "-e" ]; then
|
||||||
current="$1 $2"
|
switch="$1 $2"
|
||||||
shift 2
|
shift 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
accts="$@"
|
accts="$@"
|
||||||
if [ -z "$accts" ]; then
|
if [ -z "$accts" ]; then
|
||||||
accts="-Equity -Income -Expenses"
|
accts="-Equity -Income -Expenses"
|
||||||
if [ ! "$switch" = "-P" ]; then
|
accts="$accts -^Retirement"
|
||||||
accts="$accts -Savings -Retirement"
|
accts="$accts -Deposits"
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
limit=""
|
limit=""
|
||||||
negonly=""
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ledger $current $limit $negonly -s $switch balance $accts
|
ledger $switch $limit -s -S "-AT" -V -Q balance $accts
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue