Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Shell script
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Script written for an operating system shell}} {{About|scripting in Unix-like systems|batch programming in DOS, OS/2 and Windows|Batch file|batch programming in Windows PowerShell shell|Windows PowerShell#Scripting|programming in the shells (cmd.exe) in operating systems of the Windows NT/2000 series|cmd.exe| shell programming, by means of files called Command Scripts or Procedures on Vax/VMS machines|DIGITAL Command Language}} {{refimprove|date=February 2014}} [[File:FreeBSD 10 vi RC Firewall.png|thumb|Editing a [[FreeBSD]] shell script for configuring [[ipfirewall]] ]] A '''shell script''' is a [[computer program]] designed to be run by a [[Unix shell]], a [[command-line interpreter]].<ref>{{ citation | last1 = Kernighan | first1 = Brian W. | author-link = Brian Kernighan | last2 = Pike | first2 = Rob | author2-link = Rob Pike | title = The UNIX Programming Environment | publisher = Prentice Hall, Inc. | year = 1984 | chapter = 3. Using the Shell | page = 94 | quote = The shell is actually a programming language: it has variables, loops, decision-making, and so on. | isbn = 0-13-937699-2 }}</ref> The various dialects of shell scripts are considered to be [[command language]]s. Typical operations performed by shell scripts include file manipulation, program execution, and printing text. A script which sets up the environment, runs the program, and does any necessary cleanup or logging, is called a '''wrapper'''. The term is also used more generally to mean the automated mode of running an operating system shell; each operating system uses a particular name for these functions including batch files (MSDos-Win95 stream, [[OS/2]]), command procedures (VMS), and shell scripts ([[Windows NT]] stream and third-party derivatives like [[4NT (shell)|4NT]]—article is at [[cmd.exe]]), and mainframe operating systems are associated with a number of terms. Shells commonly present in Unix and Unix-like systems include the [[Korn shell]], the [[Bourne shell]], and [[GNU Bash]]. While a Unix operating system may have a different default shell, such as [[Zsh]] on [[macOS]], these shells are typically present for backwards compatibility.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)