Shell Script
A?shell script?is a?computer program?designed to be run by the?Unix shell, a?command-line interpreter.[1]?The various dialects of shell scripts are considered to be?scripting languages. 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, logging, etc. is called a?wrapper.
The term is also used more generally to mean the automated mode of running an operating system shell; in specific operating systems they are called other things such as batch files (MSDos-Win95 stream,?OS/2), command procedures (VMS), and shell scripts (Windows NT?stream and third-party derivatives like?4NT—article is at?cmd.exe), and mainframe operating systems are associated with a number of terms.
The typical Unix/Linux/POSIX-compliant installation includes the?KornShell?(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 may also include the?C shell?(csh),?Bash?(bash), a?Remote Shell?(rsh), a?Secure Shell?(ssh) for?SSL?telnet?connections, and a shell which is a main component of the?Tcl/Tk?installation usually called?tclsh;?wish?is a GUI-based Tcl/Tk shell. The C and Tcl shells have syntax quite similar to that of said programming languages, and the Korn shells and Bash are developments of the Bourne shell, which is based on the?ALGOL?language with elements of a number of others added as well.[2]?On the other hand, the various shells plus tools like?awk,?sed,?grep, and?BASIC,?Lisp,?C?and so forth contributed to the?Perl?programming language.[3]
Other shells available on a machine or available for download and/or purchase include?Almquist shell?(ash),?PowerShell?(msh),?Z shell?(zsh, a particularly common enhanced KornShell), the?Tenex C Shell?(tcsh), and a Perl-like shell (psh). Related programs such as shells based on?Python,?Ruby,?C,?Java,?Perl,?Pascal,?Rexx?etc. in various forms are also widely available. Another somewhat common shell is?Old shell?(osh), whose manual page states it "is an enhanced, backward-compatible port of the standard command interpreter from Sixth Edition UNIX."[4]
领英推荐
Windows-Unix interoperability software such as the?MKS Toolkit,?Cygwin,?UWIN,?Interix?and others make the above shells and Unix programming available on Windows systems, providing functionality all the way down to signals and other?inter-process communication,?system calls?and?APIs. The?Hamilton C shell?is a Windows shell that is very similar to the Unix C Shell. Microsoft distributed?Windows Services for UNIX?for use with its NT-based operating systems in particular, which have a POSIX?environmental subsystem.
https://en.wikipedia.org/wiki/Shell_script