", it's kind of pushing two streams along: is the current stream, so if I just do ". A few operators/functions can "split" the stream, or pull the stream back into place. I kind of got a feel for it by realizing that it wants to push a stream of objects through transformations, and that's about it. I don't know of any formal theory, but it feels a bit like functional programming because you don't often use variables (an advanced feature, as the manual says). So it's when I'm trying to compose filters and functions inside jq that I find it hard to use. It's when I'm dealing with json that embeds literal json strings that need to be parsed as json a second time, or when I'm trying to manipulate one or more fields in some way before outputting that I struggle. I find jq's man page as difficult as jq itself when trying to use it as a reference.Įdited to add: as a basic query language, I find it easy to use. But I just can't seem to get jq to stick.Īside, but there's a lot of times when "I know jq can do this, but I forget exactly how, let me find it in the man page" and then. I can use sed and awk and perl to great effect. I've spent 20+ years on the Unix command line. This is despite having read its man page a dozen times or more, and consulted it even more frequently than that. Every time I try to intuit how to do something, my intuition fails. Their syntax is terse, but relatively small. The problem is that I never use it outside of parsing JSON files, yet I use regular expressions all over the place: on the command line, in Python and Javascript and Java code. ![]() I have spent a lot of time trying to get familiar with jq. ![]() ![]() I'm pretty good with regular expressions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |