document2
TRANSCRIPT
Three layers of Unix OSPrograms / Applications / Tools:which speak our language.
Kernel:which interacts with the actual hardware in machine language.
Three layers of Unix OS Shell: is intermediate, which interprets
command and then conveys to kernel.
Store in a file called: ‘sh’
like representative.
Kernel:Functions:
(1) manages files
(2) carries out all data transfer
between file system and hardware
(3) manages memory
(4) handling interrupts
Store in a file called: ‘unix’
like king, overall control of everything.
What Is the Shell?The Shell provides you with an interface to the UNIX system.
It gathers input from you and executes programs based on that input.
When a program has finished executing , it displays that program’s output.
The shell is sometimes called a command interpreter.
The real power of UNIX shell is that is much more than a command interpreter. It is also a powerful programming language, complete with conditional statements, loops and functions.
Different types of Shells
Drawbacks:
1. No file name completion |
2. No command history or command editing |
3. Difficulty in execution multiple background processes or jobs |
• The Bourne Shell: written in mid-1970s, AT&T Bell Labs
First shell to appear on UNIX system programming syntax similar to ALGOL language.
Features:
1. Process control
2. Variables
3. Regular expressions
4. Flow control
5. Powerful input and output controls
6. Functions
Steve R. Bourne
Different types of Shells
Drawbacks:
1. Weak input and output controls |
2. Lack of functions |
3. Confusing syntax due to a “lazy” command interpreter |
2) The C Shell: 1980s, designed to make interactive use of the shell easier for users.
Programming style to the C style.
Advantages over Bourne Shell:
1. Command History
2. Aliases
3. File Name Completion
4. Job ControlsWilliam Nelson Joy (Bill Joy)
Different types of Shells
• The Korn Shell:
1983, AT&T Bell Labs
Superset of Bourne Shell
Features:
1. Command history and history substitution
2. Command aliases and functions
3. File Name Completion
4. Arrays
5. Built-in integer arithmetic
David Korn