Since there wasn't a built-in option to do this, I came up with the 
following:

grep "^account" accounts.txt | cut -c 9- | xargs -I{} bash -c "grep -q 
\"{}\" *.ldg || echo \"{}\""

Thanks
JL

On Thursday, January 26, 2023 at 8:57:40 PM UTC-6 Martin Michlmayr wrote:

> * Martin Michlmayr <[email protected]> [2023-01-27 10:14]:
> > The only way I can think of is:
>
> grep "^account" d | sed -e "s/^account *//" | sort | uniq > 1
> ledger -f d bal --empty --flat -F "%a\n" | sort | uniq > 2
> comm -3 1 2
> rm -f 1 2
>
> -- 
> Martin Michlmayr
> https://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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/f9c20c4c-a140-4f52-b052-b758a493a62en%40googlegroups.com.

Reply via email to