Bourne Shell: Difference between revisions

From Rosetta Code
Content added Content deleted
(changed "hashbang" to shebang, moved impl box to top, added a couple links, some rephrasing and rearranging)
(Examples marked "Works with: Bourne Shell" should work in any of the Bourne-compatible shells.)
Line 1: Line 1:
{{stub}}{{implementation|UNIX Shell}}
{{stub}}{{implementation|UNIX Shell}}


The '''[[wp:Bourne Shell|Bourne Shell]]''' is a [[Unix]] shell upon which many shells are based; notably the [[wp:Korn shell|Korn shell]] and [[Bourne Again SHell]]. (The other major tree of Unix shells descend from csh.)
The '''[[wp:Bourne Shell|Bourne Shell]]''' is a [[Unix]] shell upon which many shells are based; notably the [[wp:Korn shell|Korn shell]] and [[Bourne Again SHell]]. (The other major tree of Unix shells descend from [[csh]].)


'''Portable Shell Syntax''' is the scripting language syntax used by the [[wp:UNIX System V|System V]] Bourne shell. This syntax is compatible with the heirloom shell and is the syntax documented in most Unix books.
'''Portable Shell Syntax''' is the scripting language syntax used by the [[wp:UNIX System V|System V]] Bourne shell. This syntax is compatible with the heirloom shell and is the syntax documented in most Unix books. Examples marked "Works with: Bourne Shell" should work in any of the Bourne-compatible shells.


A Bourne Shell script begins with a [[wp:shebang (Unix)|shebang]] (also known as a ''hashbang'') like this, which tells the operating system to use the Bourne compatible shell interpreter:
A Bourne Shell script begins with a [[wp:shebang (Unix)|shebang]] (also known as a ''hashbang'') like this, which tells the operating system to use the Bourne compatible shell interpreter:

Revision as of 21:03, 9 August 2011

This page is a stub. It needs more information! You can help Rosetta Code by filling it in!
Bourne Shell is an implementation of UNIX Shell. Other implementations of UNIX Shell.

The Bourne Shell is a Unix shell upon which many shells are based; notably the Korn shell and Bourne Again SHell. (The other major tree of Unix shells descend from csh.)

Portable Shell Syntax is the scripting language syntax used by the System V Bourne shell. This syntax is compatible with the heirloom shell and is the syntax documented in most Unix books. Examples marked "Works with: Bourne Shell" should work in any of the Bourne-compatible shells.

A Bourne Shell script begins with a shebang (also known as a hashbang) like this, which tells the operating system to use the Bourne compatible shell interpreter:

#!/bin/sh

In 2009, Computerworld published an in-depth interview with Steve Bourne, The A-Z of Programming Languages: Bourne shell, or sh, which details the Bourne shell origins and design decisions.