Skip to main content

Closing out the books in ledger(1)

Closing out the books in ledger

I put this here mostly because I forget how to do it and have to make multiple starts to get it right.
ledger -f ledger.txt print -e 2022-1-1 > 2021.txt
(ledger -f ledger.txt equity -e 2022-1-1 ; \
    echo ; \
    ledger -f ledger.txt print -b 2022-1-1 ; \
    ) > 2021.txt
Closing out the books for 2021