Bourne shell script
Dan Tobias (Talk | contribs) |
Dan Tobias (Talk | contribs) |
||
Line 6: | Line 6: | ||
}} | }} | ||
− | A '''Bourne shell script''' is a text file intended to be executed as a set of commands for the Bourne shell, which is a shell (command line interpreter) for Unix-style operating systems. While a number of other shells exist for such operating systems, the Bourne shell (and descendants such as Bash) has been the normal default since Version 7 Unix in 1977, so it is what most computer people think of when discussing "Unix commands". | + | A '''Bourne shell script''' is a text file intended to be executed as a set of commands for the Bourne shell, which is a shell (command line interpreter) for [[Unix]]-style operating systems. While a number of other shells exist for such operating systems, the Bourne shell (and descendants such as Bash) has been the normal default since Version 7 Unix in 1977, so it is what most computer people think of when discussing "Unix commands". |
− | A shell script is the Unix-style (Unix, Linux, OS X, etc.) | + | A shell script is the Unix-style OS (Unix, Linux, OS X, etc.) version of what is known as a [[batch file]] in DOS/Windows systems, but has more sophisticated programming constructs, permitting very elaborate logic. |
Shell scripts will typically have a '''.sh''' file extension and '''#!/bin/sh''' as their first line (pointing at the path to the shell, of which /bin/sh is the traditional value, often symlinked to an actual program path somewhere else in the directory structure). It is common in general for files containing code to be executed in a scripting language (especially on Unix-style systems, but sometimes appearing on other platforms as well) to begin with a line of this form starting with '''#!''' followed by the path to the interpreter. Various shell scripts, as well as [[Perl]], etc., can be found with such a header. | Shell scripts will typically have a '''.sh''' file extension and '''#!/bin/sh''' as their first line (pointing at the path to the shell, of which /bin/sh is the traditional value, often symlinked to an actual program path somewhere else in the directory structure). It is common in general for files containing code to be executed in a scripting language (especially on Unix-style systems, but sometimes appearing on other platforms as well) to begin with a line of this form starting with '''#!''' followed by the path to the interpreter. Various shell scripts, as well as [[Perl]], etc., can be found with such a header. |
Revision as of 14:48, 16 February 2013
A Bourne shell script is a text file intended to be executed as a set of commands for the Bourne shell, which is a shell (command line interpreter) for Unix-style operating systems. While a number of other shells exist for such operating systems, the Bourne shell (and descendants such as Bash) has been the normal default since Version 7 Unix in 1977, so it is what most computer people think of when discussing "Unix commands".
A shell script is the Unix-style OS (Unix, Linux, OS X, etc.) version of what is known as a batch file in DOS/Windows systems, but has more sophisticated programming constructs, permitting very elaborate logic.
Shell scripts will typically have a .sh file extension and #!/bin/sh as their first line (pointing at the path to the shell, of which /bin/sh is the traditional value, often symlinked to an actual program path somewhere else in the directory structure). It is common in general for files containing code to be executed in a scripting language (especially on Unix-style systems, but sometimes appearing on other platforms as well) to begin with a line of this form starting with #! followed by the path to the interpreter. Various shell scripts, as well as Perl, etc., can be found with such a header.