3 ms·
That won’t scale well to files approaching or exceeding system RAM, though. Also, unless it’s the coloring you’re concerned with, you could replace the pipe to
by sgarland 3y ago
That won’t scale well to files approaching or exceeding system RAM, though.
Also, unless it’s the coloring you’re concerned with, you could replace the pipe to jq with pprint, a native Python library.
- chrisshroba 3y agopprint won't work here because the output is a json string, not a python object, so pprint'ing it will just print the string as is. And plus, pprint doesn't output valid json (it uses single quotes, for example), so the output isn't usable for piping into other filters and programs. And it's true that it won't scale well but it still has worked every time I've wanted it to :)