Distributed Networks Distributed Networks





Basic Unix Shell Scripts - Glossary

A B C D E  F G H I J K L  M N O P Q R  S T U V W X Y Z 

Purpose of Shells

Shells are a simple way to string together a bunch of UNIX commands for execution at any time without the need for prior compilation.
Also because its generally fast to get a script going. Not forgetting the ease with which other scripters can read the code and understand what is happening.
Lastly, they are generally completely portable across the whole UNIX world, as long as they have been written to a common standard.
The Shell History:
The basic shells come in three main language forms. These are (in order of creation) sh, csh and ksh. Be aware that there are several dialects of these script languages which tend to make them all slightly platform specific.
Where these differences are known to cause difficulties I have made special notes within the text to highlight this fact.
The different dialects are due, in the main, to the different UNIX flavours in use on some platforms. All script languages though have at their heart a common core which if used correctly will guarantee portability.

ALGOL language
An old computer programming language (no longer used) with a syntax similar to Bourne shell programming.
Append
To add information to the end of an existing file (without altering existing data in the file).
Batch file
A file containing commands to execute, as if from the command line. For example, autoexec.bat was a batch file for old DOS systems.
Binary file
A file that contains computer-readable code for a program that can be executed. Binary files are not human-readable.
Boolean
A counting system consisting of one and zero; or, expressions which can be represented by either True or False (using a one or a zero).
Command interpreter
A computer program that accepts commands entered by a user (normally from the keyboard) and processes them. The DOS C: prompt and a UNIX shell are both command interpreters.
Command line argument
Information included on the command line (as supplementary data) in a command interpreter when a program is launched.
Compiling
Converting a human-readable source code file for a program into a computer-readable file that can be executed.
Environment variable
Name-value pairs containing values that are needed (and can be accessed) by any program within the environment simply by querying for the value of the environment variable's name.
Error trapping
Defining actions (other than simply printing an error message) that should occur if an error is detected during the execution of a program.
Execute permission
A file permission within UNIX file systems that allows a program to be launched or executed.
External command
A command started from within a command interpreter (such as a UNIX shell) that is not part of the command interpreter's functionality, but must be launched as a separate (external) program.
File extension
The last part of a filename, usually separated by a period (such as .tif or .doc), which indicates the format or function of the file...
File permission
An access right assigned to a file to determine which user can read, write, or execute a UNIX file.
Glossary
To access all the items in the course glossary, click the Show All Terms button, below.
Iteration
Executing a command or list of commands repeatedly, usually one time right after another, with a slightly different value each time through.
Loop
A set of one or more commands that are executed repeatedly undercontrol of a programming structure.
Macro
Lists of commands within a program such as a word processor that are normally executed by a user, but which have been stored or recorded, and can thus be executed by the program without user intervention.
Mnemonic
Using a symbol or shortcut to represent something else, as an abbreviation or memory aid.
Non-text file
A file that does not contain human-readable words, or that is composed of control characters that cannot be printed normally. A binary executable file is a non-text file.
Numeric expression
A set of numbers (digits) and mathematical operators (such as +, -, *, /) that can be evaluated mathematically to reach a result.
OpenSource
Software for which the source code files (the programming instructions) are readily available.
PATH environment variable
A value stored in the shell that determines where the shell searches for executable programs launched from a command line.
Pipe
(verb) To route the output of one command as the input of another command (rather than routing that output to the screen or to a file). (noun) Pipes are operators (using the character "|") used within a shell command line that cause the shell to route the output of one program as the input of a second program.
Positional variable
Variables defined by the shell whenever a program or shell script is launched that contain the command line arguments that were included when the program was started.
Process
A task within the UNIX kernel; an independent program.
Process ID number
A unique number assigned by the UNIX kernel to each task (process) running on the system.
Redirection character
An operator used in the shell to change how input and output from programs is used, sending or receiving data from files or to and from other programs.
Scalar
A standard or simple variable, as opposed to a variable that contains multiple values (like an array) or one that contains additional information (such as a vector in mathematical terms).
Shell prompt
The character used by a shell to indicate that it is ready to accept commands entered by a user from the keyboard. Standard shell prompts are $, %, and #.
STDIN
The standard input channel used to retrieve data for a program, normally from the keyboard.
STDOUT
The standard output channel used to send output from a program, usually to the screen.
Structured file
A file in which data is organized into fields, columns, records, or some other definable characteristic that allows easy automated processes by a program designed around the structure of the file.
Superuser
The administrative account; the user account that has permission to control or administer a UNIX system; the root user.
Tar
The tape archive utility, used to combine multiple files into a single file (optionally compressed) for creating archives to a tape drive or other archive device, or for saving many files in a single large file for transfer to another location.
Text file
A file containing human-readable data, including configuration instructions, programming languages, or regular prose, but without special control characters like those generated by a word processing program to indicate formatting and other special options.
UNIX root user
The administrative account on a UNIX system; the superuser who has all access to the system.
Working interactively
Working with a command (or list of commands) as they are executed, providing data as needed. Using commands interactively is the opposite of running commands in batch mode (which requires no user intervention).