Almquist Shell: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 1:
{{implementation|UNIX Shell}}
The '''Almquist Shell''', a.k.a. <tt>ash</tt> is a minimal implementation of an almost-[[POSIX]] shell, and also a replacement for [[compatible with::Bourne Shell]]. Almquist ShellAsh has more features than. the original Bourne Shell, but fewer features than most other shells.; (Nofor example, it lacks arrays!). AlmquistFor Shellthe most part, it only implements POSIX features, plusbut it does have a few traditional [[BSD]] traditionsadd-ons, likesuch as <code>local</code> variables in functions. Almquist ShellAsh is the default shell, <code>/bin/sh</code>, of some systems. It does not have any of the internationalization/localization or multi-byte character encoding support required by the POSIX standard, so it is not technically a POSIX-compliant shell, but since it lacks most non-POSIX features, it is helpful in validating that <tt>#!/bin/sh</tt> scripts are not dependent upon such features.
 
The Almquist Shell does not have any of the internationalization/localization or multi-byte character encoding support required by the POSIX standard, so it is not technically a POSIX-compliant shell. Nonetheless, since it lacks most non-POSIX features, it is helpful in validating that <tt>#!/bin/sh</tt> scripts are not dependent upon such features. In general, if a script works with Almquist Shell, it will probably also work with other popular Bourne-compatible shells, such as the [[Bourne Again SHell]] and [[Z Shell]]. It may not work with the [[Korn Shell]], which uses <tt>typeset</tt> instead of <tt>local</tt>; unfortunately, while bash and zsh treat those commands as synonyms, ash in turn lacks <tt>typeset</tt>.
If a script works with Almquist Shell, it will probably also work with [[bash]], [[pdksh]] and [[zsh]]. Further, it will probably work with [[ksh93]] ''unless'' it uses <code>local</code>, which ksh93 lacks.
 
Almquist Shell filled the need for a free shell to replace Bourne Shell. Kenneth Almquist posted [http://groups.google.com/group/comp.sources.unix/msg/2774e7653a8e6274 the first version of Ash] to Usenet group comp.sources.unix at 30 May 1989. It was a clone of SVR3 Bourne Shell. [[BSD]] used Ash for <code>/bin/sh</code>, added features from POSIX, and put a Berkeley copyright on this shell.
1,480

edits