Meanwhile HN luddites: let me use awk, cut and whatnot despite the existence of an util that explicitly sidesteps this issue.
(
trap "kill 0" SIGINT;
export LC_ALL=C;
find movies.dat.gz -print0
| xargs -0 -i sh -c "gzip -dc {} | tail -n +2"
| sed "s/::/;/g"
| cut -d $';' -f2
| sort -t$';' -k 1,1
| head -n10
| awk -F ';' '{print $1}'
)
Yeah, how about no. That's a very neat site and a clever hack, but there are clear escaping flaws in there for valid movie names.bash and standard unix tools are a terrible structured-data manipulator. it's part of why `jq` is so widely used and loved, despite being kinda slow and hard to remember at times - it does things correctly, unlike most glued-together tools.
I don't think I've ever used it to parse JSON, but I've definitely used it to output simple JSON.
I'm not necessarily recommending it, but it's certainly possible and could be portable and really fast to run with a low memory footprint.
Personally I prefer using a readymade and tested library in any language that I might touch, so I can just do my own thing on top. Or, in command line, to use an util that employs such a library. Kind of hope that I'm never so constrained that only awk is available and I can't even spin up Lua.
[1] http://bigbash.it