Thursday, October 15, 2009

Types of Shells in Unix

Different people implemented the interpreter function of the shell in different ways. This gave rise to various types of shells, the most prominent of which are outlined below:

Bourne Shell
Among all, Steve Bourne's creation, known after him as the Bourne Shell, is the most popular. Probably that's why it is bundled with every Unix system. Or perhaps it is the other way round. Because it was bundled with every system it became popular. Whatever the cause and the effect, the fact remains that this is the shell used by many Unix users. This will also be the shell we shall be talking about extensively throughout the blog.

C Shell
This shell is a hit with those who are seriously into Unix programming. It was created by Bill Joy, then pursuing his graduation at the University of California in Berkeley. It has two advantages over Bourne Shell. Firstly, it allows aliasing of commands. That is, you can decide what name you want to call a command by. This proves very useful when lengthy commands which are used time and again are renamed by you. Instead of typing the entire command you can simply use the short alias at the command line.

If you want to save even more on the typing work, C shell has a command history feature. This is the second benefit that comes with C Shell. Previously typed commands can be recalled, since the C Shell keeps track of all commands issued at the command line. This feature is similar to the one provided by the program DOSKEY in MS-DOS environment.

Korn Shell
If there was any doubt about the cause-effect relationship of the popularity of Bourne Shell and it's inclusion in every package, this adds fuel to it. The not-so-widely-used Korn Shell is very powerful, and is a superset of Bourne Shell. It offers a lot more capabilities and is decidedly more efficient than the other. It was designed to be so by David Korn of AT&T Bell Labs.

No comments:

Post a Comment