Yuri - this seems to be exactly the answer I was looking for.  Thank you!

John - I apologize for causing confusion by being unclear.  As Yuri stated,
I was trying to find a way to omit the entire transaction when any posting
matched a condition.

The context for this (which I probably should have posted originally) is
that I have a file full of credit card transactions and a file full of
checking transactions.  I would like to combine the two files, but because
I use the checking account to pay off the credit card, if I combine them I
will have double counted the payments from the checking account to the
credit card.  To correct that I wanted to strip out the checking
transactions from the credit card file, so that when I combined the files
everything would end up with the correct ending balances.  Yuri's answer
let me do that.

Thank you to you both!



On Mon, Feb 24, 2020 at 1:34 PM Yuri Khan <[email protected]> wrote:

> On Tue, 25 Feb 2020 at 00:52, John Wiegley <[email protected]> wrote:
> >
> > Ah, I see, print prints the whole transaction, which does not allow you
> to
> > omit specific postings from it.
>
> Omitting specific postings from transactions would not make sense
> except in specific circumstances, as the transaction would not
> balance.
>
> As far as I understand, the OP is asking about omitting the whole
> transaction if any of its postings matches a condition. This can be
> accomplished with:
>
>     $ ledger print expr 'not any(account =~ /^Account:Particular$/)'
>

-- 

--- 
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/CAHX2JGhj4MRN1c%2ButKApogH903%2BrBPoxQ90QqmMDtHybbDdZFA%40mail.gmail.com.

Reply via email to