Hacker News new | ask | show | jobs
by skywhopper 4085 days ago
Bash doesn't exist in a vacuum. It's designed to make use of and interact heavily with those external commands. An environment missing dd, head, cut, and tr is probably not going to provide a usable /dev/tcp filesystem, either.

Ultimately the point is that a Redis client is possible using just a standard Unixish userland, and sysadmins who interact with Bash all day can easily make use of redis directly and integrate it into existing scripts without installing special client libraries or writing wrappers in Perl or Python.

1 comments

Sure -- but my point was merely in regard to the (mis)use of the word "pure" here. Avoiding calling out to external executables and remaining purely within the shell itself is also frequently a good way to improve performance (sometimes quite dramatically), so being aware of the difference is worthwhile.

(Also, /dev/tcp isn't a filesystem, just a simulation of one constructed purely within bash itself, so it wouldn't in fact depend on anything but the relevant networking syscalls.)