lipp f <flip...@gmail.com
> Thank you for your answer Richard. For me, it makes no difference if I use
> a real jurnal or an empty one. Absolutely nothing on the screen.
> Can you please explain what each command does and how are they different?
> Maybe to show how you run them, what parameters are you using and what the
> output is?
The command 'ledger pricedb' outputs prices in a format that can be read
back in by ledger, like:
P 2021/09/29 00:00:00 VBTLX $11.269182911655
P 2021/10/04 00:00:00 VBTLX $11.29
P 2021/10/11 00:00:00 VBTLX $11.19
P 2021/10/18 00:00:00 VBTLX $11.24
'ledger prices' basically outputs the same information but not in the
format of a ledger price declaration, and only one price per day, like:
2021/09/29 VBTLX $11.269182911655
2021/10/04 VBTLX $11.29
2021/10/11 VBTLX $11.19
2021/10/18 VBTLX $11.24
As you can see, there is very little difference here in my case (VBTLX
has a price at most once a day anyway) but the pricedb format above
starts with "P" and has a slot for the seconds. Note also that both
commands output prices calculated by ledger (the first line in both
cases), as well as those explicitly recorded in the price database.
The entries in my prices.db file, which I just include in my main ledger
file with the line
look like this:
P 2021/10/18 VBTLX $11.24
(I have a custom script that I use to fetch these periodically and
append them to the prices.db file.)
Thus, both of these commands require specifying the ledger file, which I
do implicitly via the LEDGER_FILE environment variable, but you can do
explicitly with e.g.
ledger -f path/to/file prices
ledger -f path/to/file pricedb
and the price declarations are then pulled in from the separate
prices.db file via the include line.
Of course, there are transactions involving these commodities in my main
ledger file, which look like
2021/09/29 * Broker
assets:Retirement:Roth IRA 10.0000 VBTLX @@ $112.69
Again, without any transactions that actually the commodities which have
prices, you probably won't see any output.
So that's my setup. Does that help?