Category:UNIX Shell: Difference between revisions

m
Correct spelling.
No edit summary
m (Correct spelling.)
 
(11 intermediate revisions by 6 users not shown)
Line 1:
{{language
[[Category:Solutions by Programming Language]]
|exec=interpreted
 
|tags=bash
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.
|hopl id=568
}}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=
 
There are many UNIX Shells and most of them can be categorized into two families. For purposes of the Rosetta Code, all examples are in Bourne-compatible syntax. The other family of shells, with a markedly different syntax, are ''csh'' ([[:Category:C Shell|C Shell]]) and its ''tcsh'' (Tenex C Shell) "clone." Common Bourne compatible shells include the original [[Bourne Shell]] (''/bin/sh'' on most versions of UNIX), the GNU [[Bourne Again SHell]] (''bash'' --- which is linked to ''/bin/sh'' on many distributions of [[Linux]], making it their default shell), the [[Korn Shell]] (''ksh''), the [[Public Domain Korn SHell]] (''pdksh''), the [[Almquist SHell]] (''ash'') and the [[Debian Almquist SHell]] (''dash'') and the [[Z SHell]] (''zsh'').
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]].
 
 
''Main article: [[UNIX Shell Implementations]]''
 
=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 a System Command|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]]:
Line 18 ⟶ 23:
#!/bin/ksh
 
Each header line consists of a hash, a bang, and the path to the [[interpreter]] binary.
Anonymous user