sorttrans-cli(1)
π sorttrans-cli β the manual, but make it make sense π
okay bestie, so sorttrans-cli lives in section 1 of the General Commands Manual, and it does exactly one iconic thing: it sorts a ledger file in chronological order. that's it. that's the whole vibe. β¨
πΈ NAME πΈ
sorttrans-cli β sorts a ledger file in chronological order ποΈβ¨
π¦ SYNOPSIS π¦
sorttrans-cli [options]
no positional args, no drama. it's all flags, babes. π
π OPTIONS π
-yβ write the file back immediately, no diff, no preview, no "wait let me look at it first". just yeet and go. π-h,--helpβ show the help message and dip out. classic. π«Ά--file FILEβ tell it the path to the ledger file you wanna work with. π--price-db PRICEDBβ tell it the path to the ledger price database you wanna work with. π°--debugβ turns on debugging output. may be useful for developers π (iykyk, if you're not a dev you probably don't need this one)
β¨ DESCRIPTION β¨
so sorttrans-cli is a text program, right? and its whole personality is sorting a ledger into chronological order. chronological, as in, time order. the timeline. the correct order. β³
here's the tea on how it works: the program loads the ledger file and sorts the transactions in memory. π§ then, depending on which command-line options you gave it, it does one of two things:
- it either writes the sorted file back π
- or it invokes
meldwith the original and the sorted version shown side by side, so you can do interactive editing like the little editor gremlin you are ππ₯οΈ
now listen carefully, bestie, because this part is not optional: the program must be supplied with the location of the ledger file to work with. no file, no sorting. periodt.
if you didn't hand it over with the command-line option --file, then the location of the file gets determined using the following mechanisms, in this order. the first mechanism which yields a result wins. π (yes, first one to show up takes the crown, the rest don't even get a turn)
π ENVIRONMENT π
the following environment variable is recognized by this program:
LEDGER_FILEβ path to ledger file to work with. π±
π FILES π
the config file for ledger(1) β namely the file .ledgerrc in the user's home directory π β is scanned, looking for the following option:
--file FILEβ path to ledger file to work with. π
π₯ SEE ALSO π₯
ledger(1), meld(1), addtrans(1), cleartrans-cli(1), sellstock-cli(1), withdraw-cli(1). π«
and that's the whole page, babe β this one's from the General Commands Manual, sorttrans-cli(1), dated November 14 2022. go forth and sort chronologically, you absolute main character. π
ππ¦
π¦ where this page comes from
- debian bookworm: ledgerhelpers 0.3.10-2 Β· GPL-2.0-or-later
- debian trixie: ledgerhelpers 0.3.10-3 Β· GPL-2.0-or-later
- ubuntu noble: ledgerhelpers 0.3.10-2 Β· GPL-2.0-or-later
- ubuntu resolute: ledgerhelpers 0.3.10-3 Β· GPL-2.0-or-later
- ubuntu stonking: ledgerhelpers 0.3.10-3 Β· GPL-2.0-or-later
- Copyright 2022 Marcin Owsiany <porridge@debian.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms