4 ms·
Learn a little jq, Awk and sed
- envolt 7y agoWhen I first saw someone using zsh (omz), I was awe-struck. Same thing happens to the person sitting next to me when I pipe an output to jq.
- magoon 7y agohowever, I find jq not so friendly piping its output to other programs.
- bradknowles 7y agoUse gron. See https://github.com/TomNomNom/gron https://github.com/TomNomNom/gron
- addicted 7y agoI recently wrote a fairly useful script and the key for me was to construct strings using jq, which were then parseable by stuff it was streamed to. https://stedolan.github.io/jq/manual/#example13 https://stedolan.github.io/jq/manual/#example13 Basicalky, I converted each JSON object passed in into a bunch of delimiter separated lines.
- mooreds 7y agoLink doesn't work for me, but that sounds like a great example!
- j88439h84 7y agoThat's what Mario is for. https://python-mario.readthedocs.io/ https://python-mario.readthedocs.io/
- sullyj3 7y agowhy would I use sed over vim for regex replacements? in nvim I can set inccommand and see whether I've gotten my line noise right as I go.