#!/bin/bash binary=ledger LEDGER=$HOME/doc/finance/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