Introduction to Data Communications | ||
---|---|---|
Previous | 51e. Shell Programs | Next |
The shell is a program that, like any other program, can be replaced. The shell is a command interpreter and a command programming language. It prompts for, reads and executes commands. The commands can come directly from a terminal or from a file.
csh /ksh
All Unix operating systems have the standard Unix shell sh. Two alternative shells csh and ksh are available and widely used. "csh" was developed by the University of California at Berkley. "ksh" was developed by AT&T and the "k" stands for Korn for the developer David Korn. Linux uses a shell called bash for Bourne again shell. It has added refinements from both csh/ksh shells.
Features of the "csh"
The Korn shell ksh uses the best features of the csh with the following enhancements:
ksh enhancements:
The ksh uses the .profile file for startup configuration.
Aliases
Depending on the shell that you are using, you will have a startup file called either .cshrc (csh) or .profile (ksh). These files contain startup information for the user. Each user has a startup file in their home directory which can be modified to suit their individual needs.
Aliases are a means of individualizing a user's account. The user can use aliases as a macro to shorten command-line entries. In the startup file, there is an area with the heading "# handy alias". The "#" indicates that this is a comment and is ignored by the operating system. Following this heading is a list of aliases:
alias vt100="set term = vt100"
This line substitutes "set term = vt100" for when you type "vt100" at the command-line. "set term = vt100" is how you tell the Unix system what type of terminal you are emulating. Depending on the flavour of Unix that you are running, you may or may not need the "=" sign after "vt100".
Notice: There is an alias for "help", it is the Unix command "man" (manual).
Introduction to Data Communications | ||
---|---|---|
Previous | Table of Contents | Next |