Bourne shell script

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{FormatInfo |formattype=Languages |subcat=Programming Languages |extensions={{ext|sh}} |released=1977 }} A '''Bourne shell script''' is a text file intended to be executed a...")
 
m (Added sample files)
 
(9 intermediate revisions by 3 users not shown)
Line 2: Line 2:
 
|formattype=Languages
 
|formattype=Languages
 
|subcat=Programming Languages
 
|subcat=Programming Languages
|extensions={{ext|sh}}
+
|extensions={{ext|sh}}, {{noext}}
 
|released=1977
 
|released=1977
 
}}
 
}}
 +
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 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.
  
A shell script is the Unix-style (Unix, Linux, OS X, etc.) OS 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''' (see [[Shebang]]) 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).
  
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).
+
==See also==
 +
* [[Batch file]]
 +
* [[C shell script]]
 +
 
 +
== Sample files ==
 +
* {{DexvertSamples|text/unixShellScript}}
  
 
== Links ==
 
== Links ==
Line 16: Line 22:
 
* [http://steve-parker.org/sh/bourne.shtml 1978 Bourne shell documentation]
 
* [http://steve-parker.org/sh/bourne.shtml 1978 Bourne shell documentation]
 
* [http://www.grymoire.com/Unix/Sh.html Bourne shell tutorial]
 
* [http://www.grymoire.com/Unix/Sh.html Bourne shell tutorial]
 +
* [http://explainshell.com/ Explainshell: gives help info on a particular command and its arguments]
 +
* [https://dev.to/thiht/shell-scripts-matter Shell Scripts Matter]

Latest revision as of 15:00, 28 December 2023

File Format
Name Bourne shell script
Ontology
Extension(s) .sh, (none)
Released 1977

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 (see Shebang) 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).

[edit] See also

[edit] Sample files

[edit] Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox