Thanks for that...also you solved a problem for me with roundto. Why is roundto() so sensitive to spaces in it's argument ?
This works roundto(amount, 2 ) but this doesn't ?? roundto(amount,2) On Sat, Oct 17, 2020 at 5:48 AM Jasel17212 <[email protected]> wrote: > The 'clear_commodity' function should do this for you. > > echo -ne "2019/12/01 * Mortgage\n Expenses:Mortgage \$10000.00\n > Assets:Checking\n" | ledger -f - reg Expenses:Mortgage --format > "%(clear_commodity(roundto(amount, 2)))\n" > > > On Sunday, October 11, 2020 at 2:08:52 PM UTC-5 [email protected] wrote: > >> Hi, >> >> I am just looking for the correct command to remove the currency from a >> ledger custom format. >> >> I have some other scripts that process the results and they I'd prefer to >> not have to pipe the output of ledger into something just to remove "$" >> from the report. >> >> Is there a way to get the %amount in a format without the currency >> attached to it ? >> >> echo -ne "2019/12/01 * Mortgage\n Expenses:Mortgage \$10000.00\n >> Assets:Checking\n" | ledger -f - reg Expenses:Mortgage --format >> "%(roundto(amount, 2))\n" >> >> >> I'd love to get >> 10000.00 >> >> Instead of >> $10000.00 >> >> >> >> >> -- > > --- > 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]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ledger-cli/6edc4ca9-e77b-4468-899c-bdb898077ec6n%40googlegroups.com > <https://groups.google.com/d/msgid/ledger-cli/6edc4ca9-e77b-4468-899c-bdb898077ec6n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- --- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/CAHkuPsv5z0Eph6ofJNJ9nvP8UKn9_FizS9UN%2BZfingP6nFfy-A%40mail.gmail.com.
