20 lines
562 B
Bash
Executable file
20 lines
562 B
Bash
Executable file
#!/bin/bash
|
|
|
|
binary=./ledger
|
|
ledger=ledger.dat
|
|
|
|
line="$binary -f $ledger"
|
|
|
|
command=$1
|
|
shift
|
|
|
|
case "$command" in
|
|
balance) $line "$@" balance -s -- -Equity -Income -Expenses -Retirement ;;
|
|
worth) $line "$@" balance assets liabilities ;;
|
|
profit) $line "$@" balance income expense ;;
|
|
spending) $line "$@" balance -F food movies gas tips \
|
|
health supplies -insurance -vacation ;;
|
|
huquq) $line "$@" balance ^huquq ;;
|
|
gold) $line "$@" balance -G $1 ^huquq ;;
|
|
equity) $line "$@" equity -- -^Income -^Expenses -^Equity ;;
|
|
esac
|