4 ms·
> 8. Use tables > By keeping each row to a single entry, you can do things like pipe to wc to get the count of lines, or grep to filter each line > Allow outp
by twic 8y ago
> 8. Use tables
> By keeping each row to a single entry, you can do things like pipe to wc to get the count of lines, or grep to filter each line
> Allow output in csv or json.
Yes please. Default to readable-but-shellable tabular output, and support other formats.
libxo from the BSD world is a really smart idea - it provides an API that programs can use to emit data, with implementations for text, XML, JSON, and HTML:
http://juniper.github.io/libxo/libxo-manual.html http://juniper.github.io/libxo/libxo-manual.html
I personally love CSV output. Something like libxo means that CSV output could be added to every program in the system in one fell swoop.