Thank you, Martin! That works great. I'm mostly interested in year end prices so I can just use -p <year> and I'll get at least one, and easy enough to grab the last date in the list.
On Monday, January 15, 2018 at 9:45:54 AM UTC-6, Martin Michlmayr wrote: > > * Scott Carpenter <[email protected] <javascript:>> [2018-01-15 07:34]: > > Is there a ledger command to find the price of a commodity on a date? It > > would look at both transaction files and prices db to find this. > > The 'pricedb' command looks at both, so you can do > > ledger pricedb <commodity> > > and then maybe grep on the date? > > Hmm, something like this seems to work: > > ledger -f 2017 pricedb usd -p "from 2017/09/14 until 2017/09/15" > > However, this assumes there's a pricedb entry on that day. If it was > a few days earlier, it wouldn't show up. > -- > Martin Michlmayr > http://www.cyrius.com/ > -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
