Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
UNIX Shell
Objectives
In this session, you learn about:
• Unix Shell
• Features of Shell
• Executing Shell Scripts
• Debugging Shell Scripts
• File Descriptors
• I/O Redirection
• Pipes
UNIX Shell
• Unix Shell is a command interpreter which executes
the user commands by interacting with the kernel
and displays the output to the user.
• An environment where we can run our commands,
programs and shell scripts.
- Bourne Shell(sh)
- Korn Shell(ksh)
- C Shell(csh)
- Bourne Again Shell(bash)
• Each flavor of the shell has its own recognized
commands and functions.
• The command ‘echo $0’ prints the current shell.
Features of Unix Shell
• Interprets Commands
• Redirects I/O
• Pipes
2) ksh /scriptpath/sample.ksh
- Creates a korn shell and execute the script in the newly
generated shell.
3) . /scriptpath/sample.ksh
- Executes in the parent shell itself. It will not create a new
shell for execution.
Debugging Shell scripts
• Here Document:
- Used to read the input from the user until the LABEL keyword
is encountered.
<< LABEL