A typical *nix shell has a lot of programming-like features, but works quite differently from languages like
Python or C++. This can make a lot of shell features — like process management, argument quoting and the
export keyword — seem like mysterious voodoo.
But a shell is just a program, so a good way to learn how a shell works is to write one. I’ve written a simple shell that fits in a few hundred lines of commented D source. Here’s a post that walks through how it works and how you could write one yourself.