| When I read "pure Bourne shell" I expected just /bin/sh. This uses cat, sed, rm, cp, grep, bc, sort, etc. too. The shell part may be "pure Bourne shell" but there are other utilities involved besides sh. I guess it was not the convention in 1987 and probably not today either but if it were me I would mention those other utilities. As a challenge, I always try to minimize the number of extra utilities I have to use, and then I try to stick with the most common, basic ones. As a result I get highly portable scripts that run just about anywhere, even in reduced functionality, embedded environments, especially non-Busybox ones. In my experience, cp and rm are to be expected in any userland. cat and sed are another two of the most common, basic utilities. But things like grep -v... I would only use that if there were no other way to do the task; e.g., can we accomplish task with sed /pattern/d\;...? If you're willing to include AWK you can do just about anything; personally I do not rely on AWK being present everywhere. |
A gap I've spent some time thinking about in constrained unix - how to do socket IPC. For example - building a cgi server. So far I've struggled without either a modern scripting language (perl, python, etc) or else a C compiler. And locked-down or decrepit systems will often lack a working C compiler.
I'd expect someone who knew what they were doing could build an awk tool that would parse a DSL to produce binaries that makes unix system calls. Probably awkward, you'd need to do your own elf packaging. A problem I might one day get around to.