|
I use gron a lot, because I can never remember how to use jq to do anything fancy but can usually make awk work. (I may be unusual in that department, in that I actually like awk) One warning to note is that gron burns RAM. I've killed 32GB servers working with 15MB JSON files. (I think gron -u is even worse, but my memory is a bit fuzzy here). https://github.com/adamritter/fastgron as an alternative has been pretty good to me in terms of performance, I think both in speed and RAM usage. |
It reads the file into memory once, then just goes through it only once, so it shouldn't need much more memory than the file size.
Also I put a lot of work into making fastgron -u fast, but you can grep the file directly as well.