::[email protected]



{{#invoke:Hatnote|hatnote}} {{ safesubst:#invoke:Unsubst||$N=Refimprove |date=__DATE__ |$B= {{#invoke:Message box|ambox}} }} {{ safesubst:#invoke:Unsubst||$N=Lead too long |date=__DATE__ |$B= {{#invoke:Message box|ambox}} }}

Editing a FreeBSD shell script for configuring ipfirewall

A shell script is a computer program designed to be run by the Unix shell, a command line interpreter.<ref>{{#invoke:citation/CS1|citation |CitationClass=citation }}</ref> The various dialects of shell scripts are considered to be scripting languages.

The typical Unix/Linux/Posix-compliant installation includes the Korn Shell (ksh) in several possible versions such as ksh88, Korn Shell '93 and others. The oldest shell still in common use is the Bourne shell (sh); Unix systems invariably include also the C Shell (csh), Bourne Again Shell (bash), a remote shell (rsh), a secure shell for SSL telnet connections (ssh), and a shell which is a main component of the Tcl/Tk installation usually called tclsh; wish is a GUI-based Tcl/Tk shell. Other shells available on a machine or available for download and/or purchase include ash, msh, ysh, zsh (a particularly common enhanced Korn Shell), the Tenex C Shell (tcsh), a Perl-like shell (psh) and others. Related programmes such as shells based on Python, Ruby, C, Java, Perl, Pascal, Rexx &c in various forms. Another somewhat common shell is osh, whose manual page states it "is an enhanced, backward-compatible port of the standard command interpreter from Sixth Edition UNIX."

Interoperability software such as Cygwin, the MKS Toolkit, Interix (which is available in the Microsoft Windows Services for Unix), Hamilton C shell, UWIN (AT&T Unix for Windows) and others allow Unix shell programmes to be run on machines running Windows NT and its successors, with some loss of functionality on the MS-DOS-Windows 95 branch, as well as earlier MKS Toolkit versions for OS/2. At least three DCL implementations for Windows type operating systems -- in addition to XLNT, a multiple-use scripting language package which is used with the command shell, Windows Script Host and CGI programming -- are available for these systems as well. Mac OS X and subsequent are Unix-like as well.<ref>MSDN</ref>

In addition to the aforementioned tools, some Posix and OS/2 functionality can be used with the corresponding environmental subsystems of the Windows NT operating system series up to Windows 2000 as well. A third, 16-bit subsystem often called the MS-DOS subsystem uses the provided with these operating systems to run the aforementioned MS-DOS batch files.<ref>Windows NT 4 Workstation Resource Kit</ref>

The console alternatives 4NT, 4DOS, 4OS2, and the GUI Take Command which add functionality to the Windows NT-style Cmd.exe, MS-DOS/Windows 95 batch files (run by, OS/2's Cmd.exe, and 4NT respectively are similar to the shells that they enhance and are more integrated with the Windows Script Host, which comes with three pre-installed engines, VBScript, JScript, and VBA and to which numerous third-party engines can be added, with Rexx, Perl, Python, Ruby, and Tcl having pre-defined functions in 4NT and related programmes. PC DOS is quite similar to MS-DOS, whilst DR DOS is more different. Earlier versions of Windows NT are able to run contemporary versions of 4OS2 by the OS/2 subsystem.

Scripting languages are, by definition, able to be extended; for example, a MS-DOS/Windows 95/98 and Windows NT type systems allows for shell/batch programmes to call tools like KixTart, QBasic, various Basic, Rexx, Perl, and Python implementations, the Windows Script Host and its installed engines. On Unix and other Posix-compliant systems, awk and sed are used to extend the string and numeric processing ability of shell scripts. Tcl, Perl, Rexx, and Python have graphics toolkits and can be used to code functions and procedures for shell scripts which pose a speed bottleneck (C, Fortran, assembly language &c are much faster still) and to add functionality not available in the shell language such as sockets and other connectivity functions, heavy-duty text processing, working with numbers if the calling script does not have those abilities, self-writing and self-modifying code, techniques like recursion, direct memory access, various types of sorting and more, which are difficult or impossible in the main script, and so on. Visual Basic for Applications and VBScript can be used to control and communicate with such things as spreadsheets, databases, scriptable programmes of all types, telecommunications software, development tools, graphics tools and other software which can be accessed through the Component Object Model.

Typical operations performed by shell scripts include file manipulation, program execution, and printing text. A script which sets up the environment, runs the programme, and does any necessary cleanup, logging, &c is called a wrapper.

[email protected] sections