Does a tool exist to convert tables on the command line like snap list or flatpak list into csv or json ouput.
I imagine it like this: <name> "snap list" --csv
Does a tool exist to convert tables on the command line like snap list or flatpak list into csv or json ouput.
I imagine it like this: <name> "snap list" --csv
No.
Since these tables take very different shapes, the tool you are looking for would need to have an understanding of the tables of each program you might use.
You shouldn't try to parse nice tabular output - that's for human consumption, not computer consumption. Most programs that can output some pretty tables also have an option where they output the data in a nicely defined format (such as JSON, for example), which then can be converted unambiguously.