0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Ledger CLIAdvent Calendar 2022

Day 11

wslでledger

Last updated at Posted at 2023-02-06

概要

wsl(wsl2じゃない)でledgerやってみた。

参考にしたページ。

インストール手順

$ sudo apt update

$ apt cache search ledger

$ sudo apt install ledger

$ ledger --version
Ledger 3.1.2-20160801, the command-line accounting tool
Copyright (c) 2003-2016, John Wiegley.  All rights reserved.
This program is made available under the terms of the BSD Public License.

動作確認

$ cd ledger
$ cat > test.ledger <<EOF
2022/12/01 スーパーで買ったわ
    Expenses:Grocery        2,000 JPY
    Assets:全財産
EOF
$ ls
test.ledger
$ cat test.ledger
2022/12/01 スーパーで買ったわ
    Expenses:Grocery        2,000 JPY
    Assets:全財産
$ ledger -f test.ledger balance
          -2,000 JPY  Assets:全財産
           2,000 JPY  Expenses:Grocery
--------------------
                   0
$ ledger -f test.ledger register
22-Dec-01 スーパーで買ったわ              Expenses:Grocery                              2,000 JPY          2,000 JPY
                                          Assets:全財産                                -2,000 JPY                  0
$ ledger -f test.ledger register "Assets:全財産"
22-Dec-01 スーパーで買ったわ              Assets:全財産                                -2,000 JPY         -2,000 JPY
$

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?