ITWissen.info - Tech know how online

shell

The shell is the user interface ofUnix or Linux. The shell itself must be counted among the utilities. It is a command interpreter that accepts commands from standard input, interprets the commands - i.e. converts them into system calls - and prints the result to standard output.

Standard input is the keyboard of a terminal, standard output is the screen or printer of a printer terminal. The standard input can be redirected, so that also the contents of a file can be the input for a command - analogously it behaves with the standard output. A shell can be used for the automated execution of specific tasks.

Shell as dialog-oriented interface

The shell is the dialog-oriented user interface between a system ( Unix, Linux) and the user. Via a special input language the user communicates his requirements, which are converted into actions by the shell. In this way, the shell executes commands or programs and constantly monitors their execution. By default, the shell takes input from standard input (stdin), prints output on standard output (stdout), and reports errors on standard error output (stderr).

Standard input is the keyboard of the user's terminal, standard output is the user's screen, and standard error output is also the screen, unless other arrangements are made or standard input and output are redirected to files.

Shell as as basic function of Unix

The shell does not belong to the basic functions of Unix (Linux), but to the service programs. Many systems have several shell versions at the same time, which have the same basic features, but are different in detail. The Bourne shell (call: sh) - named after S. R. Bourne of Bell Laboratories - was already written in the 70s. Building on this and adding more functionality, the more comfortable C shell (call: csh) was developed, whose syntax was based on the C programming language. The Korn shell (call: ksh) is also based on the Bourne shell, in particular its syntax. However the additional features of the C-Shell were integrated as well as these around new functions extended. Further user interfaces were developed with the Bourne-Again-Shell (call: bash), the Scheme-Shell (call: scsh) and the modular Z-Shell (call: zsh).

The shell executes system commands and user commands in the same way. Commands are programs provided by the system as a service if they are system commands or user commands if the shell's language capabilities are used by the user to generate their own commands.

The Shell has many characteristics of a programming language and permits the employment of variables, the control of the expiration by language elements such as for, case, while, until, if etc., the call of programs, the treatment of interruptions, the chaining of Pipes, the chaining of files, the start of commands and processes and much more.

In distinction to script languages like e.g. Tcl, Perl or awk, the shell is primarily oriented to the communication with the user, and beyond that it offers further possibilities for programming and automation of specific tasks.

Informations:
Englisch: shell
Updated at: 09.11.2013
#Words: 501
Links: user interface (UI), Linux, command, interpreter, standard (STD)
Translations: DE
Sharing:    

All rights reserved DATACOM Buchverlag GmbH © 2024