The A-Z of Programming Languages: Bourne shell

04.03.2009

I will say, and it is funny because Maurice Wilkes asked me this question when I told him what I was doing, and he said 'how can you afford to do that?' Meaning, how can you afford to write programs when the primitives are commands that you are executing and the costs of executing commands is so high relative to executing a function in a C program, for example. As I have said earlier, the primary performance limitation is that you have to do a Unix fork and exec whenever you execute a command. These are much more expensive than a C function call. And because commands are the abstraction mechanism, that made it inefficient if you are executing many commands that don't do much.

Where do you envisage the Bourne shell's future lying?

I don't know; it's a hard question. I imagine it will be around as long as Unix is around. It appears to be the most ubiquitous of the Unix shells ...What people tell me is if they want one that is going to work on all the Unix systems out there in the world, they write it in the Bourne shell (or Bash). So, that's one reason. I don't know if it is true but that is what they tell me. And I don't see Unix going away any time soon. It seems to have had a revival with the open source movement, in particular the GNU Project and the Linux kernel.

Where do you see shells going in general?

As I have said the shell is an interface to the Unix environment. It provides you with a way of invoking the Unix commands and managing this environment interactively or via scripts. And that is important because if you look at other shells, or more generally scripting languages, they typically provide access to, or control and manipulate, some environment. And they reflect, in the features that are available to the programmer, the characteristics of the environment they interface to. It's certainly true the Unix shells are like that. They may have some different language choices and some different trade offs but they all provide access to the Unix environment.