Category:UNIX Shell: Difference between revisions

From Rosetta Code
Content added Content deleted
(Copied language page.)
No edit summary
Line 5: Line 5:
=Implementation=
=Implementation=


The UNIX Shell may be implemented by any of a wide variety of programs. Notable programs used as shells include the [[Bourne SHell]], the [[Korn SHell]], and the [[Bourne Again SHell]].
The UNIX Shell may be implemented by any of a wide variety of programs. Notable programs used as shells include the [[Bourne Shell]], the [[Korn Shell]], and the [[Bourne Again SHell]].


=Language=
=Language=
Line 11: Line 11:
While UNIX Shells vary in the programming languages they support, such languages carry a minimum set of features. Each language allows the programmer to execute system commands as though he were typing the commands himself, and each language allows for a header line which specifies which shell implementation is used to interpret the script.
While UNIX Shells vary in the programming languages they support, such languages carry a minimum set of features. Each language allows the programmer to execute system commands as though he were typing the commands himself, and each language allows for a header line which specifies which shell implementation is used to interpret the script.


This one tells the operating system to use the [[Bourne SHell]]:
This one tells the operating system to use the [[Bourne Shell]]:
#!/bin/sh
#!/bin/sh
This line tells the operating system to use the [[Bourne Again SHell]]:
This line tells the operating system to use the [[Bourne Again SHell]]:
#!/bin/bash
#!/bin/bash
And this one tells the operating system to use the [[Korn SHell]]:
And this one tells the operating system to use the [[Korn Shell]]:
#!/bin/ksh
#!/bin/ksh



Revision as of 22:33, 15 September 2007


The UNIX Shell is a component of terminal-based UNIX-derived systems which offers both a command-line interface for running system commands, as well as programming interface for intelligently automating tasks which use system commands.

Implementation

The UNIX Shell may be implemented by any of a wide variety of programs. Notable programs used as shells include the Bourne Shell, the Korn Shell, and the Bourne Again SHell.

Language

While UNIX Shells vary in the programming languages they support, such languages carry a minimum set of features. Each language allows the programmer to execute system commands as though he were typing the commands himself, and each language allows for a header line which specifies which shell implementation is used to interpret the script.

This one tells the operating system to use the Bourne Shell:

#!/bin/sh

This line tells the operating system to use the Bourne Again SHell:

#!/bin/bash

And this one tells the operating system to use the Korn Shell:

#!/bin/ksh

Each header line consists of a hash, a bang, and the path to the interpreter binary.

Subcategories

This category has the following 5 subcategories, out of 5 total.

Pages in category "UNIX Shell"

The following 200 pages are in this category, out of 353 total.

(previous page) (next page)
(previous page) (next page)