> Golfing in shell can be a pipeline of tools: lately "curl | jq | awk" does a lot of lifting for me in a one-liner.
> As soon as you say "switch to (favorite decent scripting environment)", you're committing to (a) many megs of its base install, (b) its package management system, (c) whatever domain packages you need for $work, and (d) all the attendant dependency hells that brings along.
OK, but isn't jq just an example of a favorite scripting environment with a multi-meg install and a dependency system? What are you doing that's different from what you're advising everyone else not to do?
> Golfing in a scripting environment is composing a bunch of builtin operations.
> OK, but isn't jq just an example of a favorite scripting environment with a multi-meg install and a dependency system?
No? jq is a single binary a little over half a MB with no runtime dependencies. You can simply download it and use it. And you only need that if it’s not already included in whatever system you’re using, which it likely is. It even comes with macOS these days, which is more than what you can say for Python.
> I just downloaded it to see what size it was, and it's 2200 KB.
We both saw different versions. You looked at the Linux one, but I looked at the macOS one. The version which ships with macOS is smaller than the one on the website, but even so the website version is under one MB.
I’m intrigued by what causes the large difference.
> Busybox doesn't include curl or jq.
Thank you for the correction. In that case I don’t know what the other user meant. Perhaps they’ll come back and can clarify.
Fair enough point but for many years I wasn't aware of what bash COULD do. I mean one should get to learn more about [[]] and how it does regexps and while read loops:
ls *.txt | { while read FILENAME; do <something> to $FILENAME; done; }
and so on. Once you know, you can get a lot done on e.g. a docker image, without having to install lots of other things first.
> As soon as you say "switch to (favorite decent scripting environment)", you're committing to (a) many megs of its base install, (b) its package management system, (c) whatever domain packages you need for $work, and (d) all the attendant dependency hells that brings along.
OK, but isn't jq just an example of a favorite scripting environment with a multi-meg install and a dependency system? What are you doing that's different from what you're advising everyone else not to do?
> Golfing in a scripting environment is composing a bunch of builtin operations.
Neither curl nor jq is a builtin operation.