Comment

Comment by gonzus

I believe a good fit for Unix commands is using a pipeline where the output of your command (say, ls) is converted to JSON, so that later in the pipeline you can use jq to filter / count / etc in a structured, non-whitespace-dependent way. A combination of jc (https://github.com/kellyjonbrazil/jc) and jq fits the bill for me:

    ls -l /usr/bin | jc --ls | jq '.[] | select(.size > 50000000)'
parent gonzus 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton