4 ms·
What I really want is all the shell commands to have an object (e.g. json) output mode. Then all my "glue" between tools becomes less bespoke and more standard
by efitz 3y ago
What I really want is all the shell commands to have an object (e.g. json) output mode. Then all my "glue" between tools becomes less bespoke and more standardized, e.g. jq. Instead of analyzing output to build weird grep and awk statements, I would just need to remember a couple of jq patterns, take a quick look at the output, and use one of my patterns to extract the data to stream to the next command.
- wredue 3y agoSounds nice. But I think we all know how that would go (insert xkcd on competing standards)
- jijijijij 3y agoNushell? https://github.com/nushell/nushell https://github.com/nushell/nushell
- epr 3y agoI have a recurring nightmare where web developers create a one world government where they enforce a law requiring all data be converted to JSON before transmission. Existing network protocols are replaced with JSON-compatible versions, and specialized JSON parsing ASICs become a necessity in network devices. The nightmare ends with the collapse of civilization.
- efitz 3y agoDidn't that happen with XML and web services? We survived that one.
- Arcuru 3y agohttps://github.com/kellyjonbrazil/jc https://github.com/kellyjonbrazil/jc - "CLI tool and python library that converts the output of popular command-line tools, file-types, and common strings to JSON, YAML, or Dictionaries. This allows piping of output to tools like jq and simplifying automation scripts."
- efitz 3y agoThank you for the link. It still would be great built in functionality for the tools themselves.
- geophile 3y agoTake a look at Marcel, https://marceltheshell.org https://marceltheshell.org. It passes Python values instead of json, but otherwise works as you described.