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 also include the C shell (csh
), Bash (bash
), a Remote Shell (rsh
), a Secure Shell (ssh
) for SSLtelnet 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]ash
), PowerShell (msh
), Z shell (zsh
, a particularly common enhanced KornShell), the Tenex C Shell (tcsh
), a Perl-like shell (psh
). Related programs such as shells based on Python, Ruby, C, Java, Perl, Pascal, Rexx &c in various forms are also widely available. 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.'[4].
', or csh’s source).[7][8]The shell is actually a programming language: it has variables, loops, decision-making, and so on.
When the first two characters of a file are !#, the kernel scans the rest of the line for the full pathname of the interpreter to use to run the program.
When a typical shell script or function is finished, it may return an integer between 0 and 255 to let its parent know whether it was successful (or, in some case, what sort of action it performed).
Rather than using a file extension for shell scripts, it's preferred to keep a filename without extension and let an interpreter identify the type by looking into shebang(#!).
Shell scripts don't need a special file extension, so leave the extension blank (or you can add the extension .sh if you prefer, but this isn't required.
|website=
(help)|website=
(help)|website=
(help)Wikibooks has a book on the topic of: Shell Programming |