Category:UNIX Shell Implementations: Difference between revisions

I chose this spot to insert a comparison table.
m (Proofreading, links)
(I chose this spot to insert a comparison table.)
Line 1:
{{implementation cat|UNIX Shell}}
 
There are many [[UNIX Shell]]s and most of them canbelong be categorized intoto two families. For purposes of the Rosette Code, all examples are in Bourne-compatible syntax. The other family of shells, with a markedly different syntax, are ''csh'' and it'sits ''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'').
 
== Bourne-compatible shells ==
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'' --- which is ''/bin/ksh'' on some systems, ''/bin/sh'' on [[OpenBSD]]),
* the [[MirBSD Korn Shell]] (''mksh'' -- which is ''/bin/sh'' on some systems)
* the [[Almquist SHell]] (''ash'' --- which is ''/bin/sh'' on some systems),
* the [[Debian Almquist SHell]] (''dash''),
* and the [[Z SHell]] (''zsh'').
 
=== Comparison table ===
{| class="wikitable sortable"
! Feature
! Bourne ''sh''
!
* ''ash''
* ''dash''
!
* ''pdksh''
* ''mksh''
! ''bash''
|-
! Manual page
| [http://heirloom.sourceforge.net/sh/sh.1.html Heirloom sh]
|
* [http://netbsd.gw.com/cgi-bin/man-cgi?sh++NetBSD-current NetBSD sh]
* [http://man.cx/dash dash]
|
* [http://www.openbsd.org/cgi-bin/man.cgi?query=ksh&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html OpenBSD ksh]
* [http://www.mirbsd.org/htman/i386/man1/mksh.htm mksh]
| [http://man.cx/bash bash]
|}
 
Adding more rows to the table...
 
=== Portability notes ===
The original Bourne shell went through a number of revisions in the early years of UNIX, and support for some features varies considerably. By the time the SUSv3 (Single Unix Specification, version 3) features stabilized, all versions of the various Bourne-compatible shells should support a common set of features. This is denoted in Rosette Code examples with the phrase: "SUSv3" features. The Korn shell (originally written by David Korn of AT&T) and its "public domain" clone offer extensions (such as co-processes, and "associative arrays" --- called "hash arrays" by [[Perl]], "dictionaries" by [[Python]], "maps" by [[Lua]], etc).
 
Anonymous user