[TUHS] Tech Sq elevator (Was: screen editors) [ really I think efficiency now ]

arnold at skeeve.com arnold at skeeve.com
Wed Jan 22 17:21:47 AEST 2020


> On Sat, Jan 18, 2020 at 09:45:22AM -0600, Michael Parson wrote:
> > 
> > And here, understanding the model is important, namely, grep is the
> > wrong tool for searching/parsing JSON output. Dealing with JSON from the
> > shell, you should use jq.  I've been dragged kicking and screaming into
> > dealing with JSON, and about all I can say about it is, I like it about
> > this >< much more than XML. :)

Derek Fawcus <dfawcus+lists-tuhs at employees.org> wrote:
> If push comes to shove, one can always use xmlawk (xml extension for gawk)
> to beat the latter in to submission.

There is also a simple JSON extension for gawk in the gawkextlib project
that can suck in a single JSON record and turn it into a gawk
multidimensional array, and vice versa.  (Gawk has true multidimensional
arrays and isarray/typeof functions so that you can easily traverse
such an array.)

(<horn ownership="mine">Toot!</horn>)

Arnold


More information about the TUHS mailing list