3 ms·
https://github.com/dbohdan/sqawk https://github.com/dbohdan/sqawk It parses DSV data like Awk does, runs SQL queries against it and formats the output in one o
by networked 10y ago
https://github.com/dbohdan/sqawk https://github.com/dbohdan/sqawk
It parses DSV data like Awk does, runs SQL queries against it and formats the output in one of several ways. An example I am particularly fond of is using this tool as a poor man's libxo (https://github.com/Juniper/libxo https://github.com/Juniper/libxo):
$ ps | sqawk -output json,indent=1 'select PID,TTY,TIME,CMD from a' trim=left header=1
[{
"PID" : "3947",
"TTY" : "pts/2",
"TIME" : "00:00:07",
"CMD" : "zsh"
},{
"PID" : "15951",
"TTY" : "pts/2",
"TIME" : "00:00:00",
"CMD" : "ps"
},{
"PID" : "15952",
"TTY" : "pts/2",
"TIME" : "00:00:00",
"CMD" : "tclkit-8.6.3-mk"
}]
I started a list of command line tools for querying, processing and converting structured text data: https://github.com/dbohdan/structured-text-tools https://github.com/dbohdan/structured-text-tools.