Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
Comparison of command shells
List article

A command shell is a command-line interface to interact with and manipulate a computer's operating system.

General characteristics

ShellUsual environmentUsually invokedIntroducedPlatform-independentDefault login shell inDefault script shell inLicenseSource code availabilityUser interfaceMouse supportUnicode supportISO 8601 supportConsole redirectionStream redirectionConfigurabilityStartup/shutdown scriptsBatch scriptsLoggingAvailable as statically linked, independent single file executable
Thompson shellUNIXsh1971UNIXUNIXYesText-based CLINoNoYes
Bourne shell 1977 version7th Ed. UNIXsh1977Yes17th Ed. UNIX7th Ed. UNIX,Proprietary2YesText-based CLINoNoYesYes (arbitrary fds)Yes (via variables and options)Yes (.profile)Yes (Unix feature)NoYes
Bourne shell current versionVarious UNIXsh1977Yes3SunOS-5.x, FreeBSD4SunOS-5.xCDDL5[better source needed]YesText-based CLINoYes6[better source needed]YesYes (arbitrary fds)Yes (via variables and options)Yes (.profile)Yes (Unix feature)Yes7Yes
POSIX shell8POSIXsh19929POSIXText-based CLINoYes, if used by configured localeYesYes (arbitrary fds)Yes (via variables and options)Unspecified (.profile given as an example)Yes (Unix feature)Yes
bash (v4)POSIXbash, sh198910YesGNU, Linux (default for root), macOS 10.3–10.14GNU, Linux, Haiku, macOS 10.3–10.14GPLYesText-based CLINoYes11[better source needed]Yes (printf builtin)YesYes (arbitrary fds)Yes (via variables and options)Yes (/etc/profile, .bash_profile, .bash_login, .profile, .bashrc)Yes (Unix feature)YesYes
cshPOSIXcsh1978YesSunOS?BSDYesText-based CLINoNo?YesYes (stdin, stdout, stdout+stderr)Yes (via variables and options)Yes (~/.cshrc, ~/.login, ~/.logout)Yes (Unix feature)YesYes
tcshPOSIXtcsh, csh198312YesFreeBSD (former default for root),13 formerly Mac OS X?BSDYesText-based CLINoYes?YesYes (stdin, stdout, stdout+stderr)Yes (via variables and options)Yes (/etc/csh.cshrc, /etc/csh.login, ~/.tcshrc, ~/.cshrc, ~/.history, ~/.login, ~/.cshdirs)Yes (Unix feature)YesYes
Hamilton C shellWin32, OS/2csh198814Yes (OS/2 version no longer maintained)OptionalOptionalProprietaryNoText-based CLINoNoYes (-t timestamp operator)YesYes (stdin, stdout, stdout+stderr)Yes (via variables and options)Yes (via login.csh, startup.csh and logout.csh)Yes (command line option)YesYes
ScshPOSIXscsh1994Yes??BSD-styleYes?????Yes????Yes
ksh (ksh93t+)POSIXksh19831516YesAIX, HP-UXOpenSolarisCommon Public LicenseYesText-based CLINoYesYes (printf builtin with %(%F)T17)YesYes (fds up to 9)18Yes (via variables and options)Yes (system and user's profile and kshrc)Yes (Unix feature)YesYes
pdkshPOSIXksh, sh1989?YesOpenBSD19OpenBSD20Public domainYesText-based CLINoNoYesYes (arbitrary fds)Yes (via variables and options)Yes (/etc/profile, .profile)Yes (Unix feature)YesYes
zshPOSIXzsh1990YesDeepin, GoboLinux, Grml, macOS 10.15+, Kali 2020.4+Grml, macOS 10.15+MIT-styleYesText-based CLIvia additional code21YesYes (various internal features involving the date, by using the %F strftime format22 and the -i option for the fc builtin23)YesYes (fds up to 9)24Yes (via variables, options, functions, styles, etc.)Yes (system and user's zshenv, zprofile, zshrc, zlogin, zlogout)Yes (Unix feature)YesYes
ashPOSIXsh1989YesMinix, BusyBox based systemsNetBSD, Minix, BusyBox based systemsBSD-styleYesText-based CLINoPartial (for BusyBox, supported in command-line editing, but not in string handling25)YesYes (arbitrary fds)Yes (via variables and options)Yes (/etc/profile, .profile)Yes (Unix feature)YesYes
CCPCP/M, MP/M(CCP)1976 (1974)NoCP/M (no login), MP/MCP/M, MP/MFreeware (originally proprietary)Yes (originally closed-source)Text-based CLINoNoNoNoNoNoYes (automatic via $$$.SUB)Partial (only via external SUBMIT command to update $$$.SUB)NoYes
COMMAND.COMDOSCOMMAND1980No (3rd party implementations, not bound to a specific DOS vendor or version, available)DOS, Windows 95, 98, SE, MEDOS, Windows 95, 98, SE, MEvendor specific, f.e. MS-EULA,26 or BSD/GPL (free clones)No (except for OpenDOS, DR-DOS, PTS/DOS and FreeDOS)Text-based CLINoNoNo (except for DR-DOS)Yes (via COMMAND con: or CTTY con:)Yes (stdin, stdout)Yes (via startup parameters and environment variables, DR-DOS also supports DIR /C /R user-default switch command)Yes (automatic \AUTOEXEC.BAT for primary shell, or explicitly via /P, /P:filename.bat or /K startup options)Yes (via CALL command or /C and /K startup options)NoYes
OS/2 CMD.EXEOS/2, eComStation, ArcaOSCMD1987NoOS/2, eComStation, ArcaOSOS/2, eComStation, ArcaOSIBM-EULA27NoText-based CLINoNoNoNoYes (stdin, stdout, stderr)?Partial (only via /K startup option)Yes (via CALL command or /C and /K startup options)NoYes
Windows CMD.EXE28Win32CMD1993NoWindows NT, 2000, XP, Server 2003, VistaWindows NT, 2000, XP, Server 2003, VistaMS-EULA29NoText-based CLINoPartial (CHCP 65001 for UTF-8, but program arguments are still encoded in local codepage)NoNoYesYes (via registry, startup parameters, and environment variables)Yes (automatic via registry, or explicitly via /K startup option)Yes (via CALL command or /C and /K startup options)NoYes
4DOS, NDOSDOS, Windows 95, 98, SE, ME4DOS, NDOS1989 (1986)No (not bound to a specific OS vendor or version)OptionalOptionalMIT License, with restrictionsYesText-based CLI with TUI extensionsYes (popups, help system, %_MOUSE internal variable, INKEY /M command)NoYesYes (via CTTY con:, except for DRAWBOX, DRAWLINE, DRAWVLINE, LIST, SCREEN, SCRPUT, SELECT, VSCRPUT commands and file / directory coloring)Yes (stdin, stdout, stderr, stdout+stderr)Yes (via 4DOS.INI/NDOS.INI file, startup parameters, environment variables, SETDOS command)Yes (automatic \AUTOEXEC.BAT for primary shell and 4START.BTM/4START.BAT as well as 4EXIT.BTM/4EXIT.BAT for any shell, or explicitly via /P, /P:dir\filename.ext or /K startup options)Yes (via CALL command or /C and /K startup options)YesYes
4OS2OS/2, eComStation, ArcaOS4OS21992No (not bound to specific OS/2 versions)Optional (but bundled with ArcaOS)OptionalFreewareYesText-based CLINoNoNoNoYes (stdin, stdout, stderr, stdout+stderr)Yes (via 4OS2.INI file, startup parameters, environment variables, SETDOS command)Yes (automatic via 4START.CMD/4START.BTM as well as 4EXIT.CMD/4EXIT.BTM files, or explicitly via /K startup.cmd option)Yes (via CALL command or /C and /K startup options)Yes?
TCC (formerly 4NT)Win32TCC1993No (not bound to specific NT versions)optionaloptionalSharewareNoText-based CLI (Take Command: GUI)Yes (console mouse, popups, help system, %_XMOUSE, %_YMOUSE internal variables, INKEY /M command)YesYesNoYes (stdin, stdout, stderr, stdout+stderr)Yes (via registry, TCMD.INI/4NT.INI file, startup parameters, environment variables, SETDOS command)Yes (automatic via registry and TCSTART/4START as well as TCEXIT/4EXIT, or explicitly via /K startup option)Yes (via CALL command or /C and /K startup options)YesNo
VMS DCL30OpenVMSAutomatically for login/interactive process1977?YesVMSVMSProprietary, bundled in VMSby special license onlyText-based CLIwith DECwindows/MotifYesYes, at least to 1988 standardYesYes (sys$input, sys$output assignment)Yes (via symbols, logical names, and options)Yes (SYS$MANAGER:SYLOGIN.COM and user defined LOGIN.COM)YesYesNo
PowerShell.NET,.NET FrameworkPowerShell2006YesWindows 10, 8, Server 2008, 731Windows 10, 8, Server 2008, 7MIT-styleYesGraphical CLIYesYesYesYesYesYes (via variables and options)Yes (%USERPROFILE%\Documents \WindowsPowerShell\Microsoft.PowerShell_profile.ps1)Yes (PowerShell feature)YesNo
rcPlan 9, POSIXrc1989YesPlan 9, Version 10 UnixPlan 9, Version 10 UnixMIT License32YesText-based CLI?YesYes?YesYes (via options)Yes ($HOME/.rcrc)Yes?Yes
BeanShellJava?2005Yes??LGPL???Yes??Yes????No
fishPOSIXfish200533YesGhostBSD?GPLYesText-based CLI?Yes??Yes (arbitrary fds)Yes (through environment variables and via web interface through fish_config)Yes (/etc/fish/config.fish and ~/.config/fish/config.fish)Yes (Unix feature)Yes (~/.config/fish/fish_history*)?
IonRedox, Linuxion201534YesRedoxRedoxMITYesText-based CLI?YesYes?Yes (arbitrary fds)Yes (follows the XDG Base Directory spec)Yes (~/.config/ion/initrc)YesYes (~/.local/share/ion/history)Partial (not distributed as a standalone executable, but it can be built as one)
ShellUsual environmentUsually invokedIntroducedPlatform-independentDefault login shell inDefault script shell inLicenseSource code availabilityUser interfaceMouse supportUnicode supportISO 8601 supportConsole redirectionStream redirectionConfigurabilityStartup/shutdown scriptsBatch scriptsLoggingAvailable as statically linked, independent single file executable

Interactive features

ShellCommandnamecompletionPathcompletionCommandargumentcompletionWildcardcompletionCommandhistoryMandatoryargumentpromptAutomaticsuggestionsColoreddirectorylistingsTexthighlightingSyntaxhighlightingDirectory history, stack or similar featuresImplicitdirectorychangeAuto­correctionIntegratedenvironmentSnippetsValuepromptMenu/optionspromptProgressindicatorContextsensitivehelp
Thompson shellNoNoNoNoNoNoNo??NoNoNoNoNoNoNoNoNoNo
Bourne shell 1977 versionNoNoNoNoNoNoNo??NoNoNoNoNoNoYesNoExternalNo
Bourne shell current versionNoYes35NoNoYes36NoNoYesYesNoYes (CDPATH, pushd, popd, dirs), CDPATH since SVr4NoNoNoNoYesNoExternalNo
POSIX shellNoNoNoNoYesNoNoYesYesNoYes (CDPATH)NoNoNoNoYesNoExternalNo
bash (v4.0)YesYesYesYes37YesNoNoYesYesNoYes (CDPATH, pushd, popd)optionalNoNoNoYesYesExternalNo
cshYesYesNoNoYesNoNoYesYesNoYes (cdpath, pushd, popd)optionalNoNoNoYesNoExternalNo
tcshYesYeswhen definedNoYesNoNoYesYesNoYes (cdpath, pushd, popd)optionalYesNoNoYesNoExternalNo
Hamilton C shellYesYesNoYesYesNoNoYesYesNoYes (cdpath, pushd, popd)NoNoNoNoYesNoExternalNo
ScshNoNoNoNoNoNoNo??NoNoNoNoNoNoYesNoExternalNo
ksh (ksh93t+)Yes (extendable)Yes (extendable)NoNoYesNoNoYesYesNoYes (cdpath builtin, pushd, popd implemented as functions)NoNoNoNoYesYesExternalNo
pdkshYesYesNoNoYesNoNoYesYesNoNoNoNoNoNoYesYesExternalNo
zshYesYesYesYes38YesYes39Yes (via predict-on or user-defined40)YesYesThird-party extension41YesoptionalYesNowhen defined (as ZLE widgets)YesYesExternalYes
ashNoNoNoNoYesNoNoYesYesNoNoNoNoNoNoYesYesExternalNo
CCPNoNoNoNoNoNoNoNoNoNoNoNoNoNoNoNoNoNoNo
COMMAND.COMNoNoNoNoNo4243NoNoNoNo (only in DR-DOS through %$ON%, %$OFF%, %$HEADER%, %$FOOTER%)NoNoNoNoNo (only single-stepping with COMMAND /Y44)NoNoNo (only via external CHOICE command, in DR-DOS also via SWITCH / DRSWITCH internal commands)NoNo
OS/2CMD.EXEYesYesNoNoYesNoNoNoNoNoNoNoNoNoNoNoNoNoNo
WindowsCMD.EXEpartialpartialNoNoYes (F8)NoNoNoNoNoYes (PUSHD, POPD)NoNoNoNoYes (via SET /P command)NoNoNo
4DOSYesYesYesYesYes4546NoNoYesNoNo(via popup, extended directory searches, CDPATH, PUSHD, POPD, DIRHISTORY, DIRS, CDD, CD - commands and %@DIRSTACK[] function)YesNoYesNoYes (via INPUT, INKEY and ESET commands)Yes (via @SELECT[] function, and indirectly via a combination of INKEY, INPUT, SWITCH commands)NoYes
4OS2????YesNoNoYesNoNoYesYesNo?No??NoYes
TCC (formerly 4NT)YesYesYesYesYesNoNoYesNoYes(via popup, extended directory searches, CDPATH, PUSHD, POPD, DIRHISTORY, DIRS, CDD, CD - commands and %@DIRSTACK[] function)YesNoYesNoYes (via INPUT, INKEY, ESET and SET /P commands)Yes (via @SELECT[] function, and indirectly via a combination of INKEY, INPUT, SWITCH commands)47NoYes
PowerShellYesYesYesYesYes (F8)YesYes; via PSReadLine48 module (bundled in v5.049) or in ISE50Third-party extension51Yes52Yes; via PSReadLine53 module (bundled in v5.0) or in ISE54Yes (multiple stacks; multiple location types;55 Push-Location, Pop-Location)Yes, in PSReadLine56 moduleYes, in ISE57Yes, in ISE58YesYes59Yes60Yes, in ISE61popup window62
rcYes63Yes64NoNoYes65NoNoNo?NoNoNoNoNoNo?NoNoNo
BeanShellYesYesNoNoNoNoNo??NoNoNoNoNoNoNoNoNoNo
VMS DCLMinimum uniqueness schemeNoNoNoYesYesNo??NoNoNoNoNoNoYesNoNoNo
fishYesYesYes66Yes67YesNoYesYesYes (built-in helper available68)YesYesYesYesYes69Yes, using abbr commandYes(via fish_config command70)NoNo
ShellCommandnamecompletionPathcompletionCommandargumentcompletionWildcardcompletionCommandhistoryMandatoryargumentpromptAutomaticsuggestionsColoreddirectorylistingsTexthighlightingSyntaxhighlightingDirectory history, stack or similar featuresImplicitdirectorychangeAuto­correctionIntegratedenvironmentSnippetsValuepromptMenu/optionspromptProgressindicatorContextsensitivehelp

Background execution

Background execution allows a shell to run a command without user interaction in the terminal, freeing the command line for additional work with the shell. POSIX shells and other Unix shells allow background execution by using the & character at the end of command.

Completions

Main article: Command-line completion

Completion features assist the user in typing commands at the command line, by looking for and suggesting matching words for incomplete ones. Completion is generally requested by pressing the completion key (often the Tab ↹ key).

Command name completion is the completion of the name of a command. In most shells, a command can be a program in the command path (usually $PATH), a builtin command, a function or alias.

Path completion is the completion of the path to a file, relative or absolute.

Wildcard completion is a generalization of path completion, where an expression matches any number of files, using any supported syntax for file matching.

Variable completion is the completion of the name of a variable name (environment variable or shell variable). Bash, zsh, and fish have completion for all variable names. PowerShell has completions for environment variable names, shell variable names and — from within user-defined functions — parameter names.

Command argument completion is the completion of a specific command's arguments. There are two types of arguments, named and positional: Named arguments, often called options, are identified by their name or letter preceding a value, whereas positional arguments consist only of the value. Some shells allow completion of argument names, but few support completing values.

Bash, zsh and fish offer parameter name completion through a definition external to the command, distributed in a separate completion definition file. For command parameter name/value completions, these shells assume path/filename completion if no completion is defined for the command. Completion can be set up to dynamically suggest completions by calling a shell function.71 The fish shell additionally supports parsing of man pages to extract parameter information that can be used to improve completions/suggestions. In PowerShell, all types of commands (cmdlets, functions, script files) inherently expose data about the names, types and valid value ranges/lists for each argument. This metadata is used by PowerShell to automatically support argument name and value completion for built-in commands/functions, user-defined commands/functions as well as for script files. Individual cmdlets can also define dynamic completion of argument values where the completion values are computed dynamically on the running system.

Command history

Main article: Command history

Users of a shell may find themselves typing something similar to what they have typed before. Support for command history means that a user can recall a previous command into the command-line editor and edit it before issuing the potentially modified command.

Shells that support completion may also be able to directly complete the command from the command history given a partial/initial part of the previous command.

Most modern shells support command history. Shells which support command history in general also support completion from history rather than just recalling commands from the history. In addition to the plain command text, PowerShell also records execution start- and end time and execution status in the command history.

Mandatory argument prompt

Further information: Named parameter § Optional parameters

Mandatory arguments/parameters are arguments/parameters which must be assigned a value upon invocation of the command, function or script file. A shell that can determine ahead of invocation that there are missing mandatory values, can assist the interactive user by prompting for those values instead of letting the command fail. Having the shell prompt for missing values will allow the author of a script, command or function to mark a parameter as mandatory instead of creating script code to either prompt for the missing values (after determining that it is being run interactively) or fail with a message.

Automatic suggestions

Main article: Autocomplete

Shells featuring automatic suggestions display optional command-line completions as the user types. The PowerShell and fish shells natively support this feature; pressing the Tab ↹ key inserts the completion.

Implementations of this feature can differ between shells; for example, PowerShell72 and zsh73 use an external module to provide completions, and fish derives its completions from the user's command history.74

Directory history, stack or similar features

Further information: pushd and popd

Shells may record a history of directories the user has been in and allow for fast switching to any recorded location. This is referred to as a "directory stack". The concept had been realized as early as 197875 in the release of the C shell (csh).

Command line interpreters 4DOS and its graphical successor Take Command Console also feature a directory stack.

Implicit directory change

A directory name can be used directly as a command which implicitly changes the current location to the directory.

This must be distinguished from an unrelated load drive feature supported by Concurrent DOS, Multiuser DOS, System Manager and REAL/32, where the drive letter L: will be implicitly updated to point to the load path of a loaded application, thereby allowing applications to refer to files residing in their load directory under a standardized drive letter instead of under an absolute path.76

Autocorrection

When a command line does not match a command or arguments directly, spell checking can automatically correct common typing mistakes (such as case sensitivity, missing letters). There are two approaches to this; the shell can either suggest probable corrections upon command invocation, or this can happen earlier as part of a completion or autosuggestion.

The tcsh and zsh shells feature optional spell checking/correction, upon command invocation.

Fish does the autocorrection upon completion and autosuggestion. The feature is therefore not in the way when typing out the whole command and pressing enter, whereas extensive use of the tab and right-arrow keys makes the shell mostly case insensitive.

The PSReadLine77 PowerShell module (which is shipped with version 5.0) provides the option to specify a CommandValidationHandler ScriptBlock which runs before submitting the command. This allows for custom correcting of commonly mistyped commands, and verification before actually running the command.

Progress indicator

A shell script (or job) can report progress of long running tasks to the interactive user.

Unix/Linux systems may offer other tools support using progress indicators from scripts or as standalone-commands, such as the program "pv".78 These are not integrated features of the shells, however.

Colored directory listings

JP Software command-line processors provide user-configurable colorization of file and directory names in directory listings based on their file extension and/or attributes through an optionally defined %COLORDIR% environment variable.

For the Unix/Linux shells, this is a feature of the ls command and the terminal.

Text highlighting

The command line processors in DOS Plus, Multiuser DOS, REAL/32 and in all versions of DR-DOS support a number of optional environment variables to define escape sequences allowing to control text highlighting, reversion or colorization for display or print purposes in commands like TYPE. All mentioned command line processors support %$ON% and %$OFF%. If defined, these sequences will be emitted before and after filenames. A typical sequence for %$ON% would be \033[1m in conjunction with ANSI.SYS, \033p for an ASCII terminal or \016 for an IBM or ESC/P printer. Likewise, typical sequences for %$OFF% would be \033[0m, \033q, \024, respectively. The variables %$HEADER% and %$FOOTER% are only supported by COMMAND.COM in DR-DOS 7.02 and higher to define sequences emitted before and after text blocks in order to control text highlighting, pagination or other formatting options.

For the Unix/Linux shells, this is a feature of the terminal.

Syntax highlighting

Main article: Syntax highlighting

A defining feature of the fish shell is built-in syntax highlighting, As the user types, text is colored to represent whether the input is a valid command or not (the executable exists and the user has permissions to run it), and valid file paths are underlined.79

An independent project offers syntax highlighting as an add-on to the Z Shell (zsh).80 This is not part of the shell, however.

PowerShell provides customizable syntax highlighting on the command line through the PSReadLine81 module. This module can be used with PowerShell v3.0+, and is bundled with v5.0 onwards. It is loaded by default in the command line host "powershell.exe" since v5.0.82

Take Command Console (TCC) offers syntax highlighting in the integrated environment.

Context sensitive help

Main article: Context-sensitive help

4DOS, 4OS2, 4NT / Take Command Console and PowerShell (in PowerShell ISE) looks up context-sensitive help information when F1 is pressed.

Zsh provides various forms of configurable context-sensitive help as part of its run-help widget, _complete_help command, or in the completion of options for some commands.

The fish shell provides brief descriptions of a command's flags during tab completion.

Programming features

ShellFunctionsException handlingSearch & replaceon variable substi­tutionsArithmeticFloating pointMath function libraryLinear arrays or listsAssoc­iativearraysLambdafunctionsevalfunctionPseudo­random number generationBytecode
Bourne shell 1977 versionNoYes (via trap)NoNoNoNoNoNoNoYesNoNo
Bourne shell current versionYes since SVR2Yes (via trap)NoYes83NoNoNoNoNoYesNoNo
POSIX shellYesYes (via trap)NoYesNoNoNoNoNoYesNoNo
bash (v4.0)YesYes (via trap)Yes (via ${//} syntax)YesNoNoYesYesNoYesYes ($RANDOM)No
cshNoNoYes (via $var:s/// syntax)YesNoNoYesNoNoYesNoNo
tcshWork in progress84NoYes (via $var:s/// syntax)YesNoNoYesNoNoYesNoNo
Hamilton C shellYesNoYes (via $var:s/// syntax)YesYesYesYesNoNoYesYes (random utility)No
ScshYes?Yes (via string functions and regular expressions)???Yes?YesYesYes (random-integer, random-real)Yes (compiler is Scheme48 virtual machine, via scshvm)
ksh (ksh93t+)YesYes (via trap)Yes (via ${//} syntax and builtin commands)YesYesYesYesYesNoYesYes ($RANDOM)Yes (compiler is called shcomp)
pdkshYesYes (via trap)NoYesNoNoYesNoNoYesYes ($RANDOM)No
zshYesYesYes (via ${:s//} and ${//} syntax)YesYesYes (zsh/mathfunc module)YesYesNoYesYes ($RANDOM)Yes (built-in zcompile command)
ashYesYes (via trap)NoYes (since 1992)85NoNoNoNoNoYesNoNo
CCPNo?NoNo??NoNoNoNoNoNo
COMMAND.COMNoPartial (only Auto-fail (via COMMAND /F (or /N in some versions of DR-DOS))NoNoNoNoNoNoNoNoNoNo
OS/2 CMD.EXENoNoNo?NoNo?NoNoNoNoNo
Windows CMD.EXEYes (via CALL :label)NoYes (via SET %varname:expression syntax)Yes (via SET /A)86NoNoYes (via SET87)NoNoNoYes (%random%)No
4DOSYesYes (via ON command, optional Auto-fail via 4DOS /F)Yes (via %@Replace[...] function)Yes (via SET /A)??Yes (via ranges, include lists, @file lists and FOR command)NoNoYesYes (%@Random[...] function)Yes (via BATCOMP command)
4OS2????????NoYesYes (%@Random[...] function)?
TCC (formerly 4NT)YesYes (via ON and various ...MONITOR commands)Yes (via %@Replace[...] function)Yes (via SET /A)??Yes (via ranges, include lists, @file lists and FOR command)?NoYesYes (%@Random[...] function)Yes (via BATCOMP command)
PowerShellYesYes (Try-Catch-Finally)Yes (-replace operator)YesYes[Math] class88YesYesYes89YesYesYes, automatic
rcYesYesNoYes??Yes?NoYesNoNo
BeanShellYesYes?Yes??YesYesNoYesYesYes
VMS DCLYesYesNoYesNoyes, for compiled programsYesNoNoNoNoNo
fishYesYes (via trap)Yes, via string builtin command90YesYesYesYesNoNoYesYes (random)No

String processing and filename matching

ShellString processingAlternation (Brace expansion)Pattern matching (regular expressions built-in)Pattern matching (filename globbing)Globbing qualifiers (filename generation based on file attributes)Recursive globbing (generating files from any level of subdirectories)
Bourne shell 1977 version?NoNoYes (*, ?, [...])NoNo
Bourne shell recent versionPartial (prefix and suffix stripping in variable expansion)NoNoYes (*, ?, [...])NoNo
POSIX shellPartial (prefix and suffix stripping in variable expansion)NoNoYes (*, ?, [...])NoNo
bash (v4.0)Partial (prefix and suffix stripping in variable expansion)YesYesYes (*, ?, [...], {...})NoYes (**/...)
cshYes (:s and other editing operators)YesNoYesNoNo
tcshYes (:s and other editing operators)YesYesYesNoNo
Hamilton C shellYes (:s and other editing operators + substr, strlen, strindex, printf, reverse, upper, lower, concat and other builtin functions)YesNoYesNoYes (via indefinite directory "..." wildcard91)
Scsh??YesYesNoNo
ksh (ksh93t+)Partial (prefix, suffix stripping and string replacement in variable expansion)Yes92YesYes (*, ?, [...])NoYes (with set -G, no following of symlinks)
pdksh?Yes93NoYesNoNo
zshYes (through variable processing: e.g. substring extraction, various transformations via parameter expansion)YesYesYes (*, ?, [...], extended globbing94)YesYes (**/... or ***/... to follow symlinks)
ash??NoYesNoNo
CCPNoNoNoNoNoNo
COMMAND.COMNoNoNoYes (*, ?)NoNo
OS/2 CMD.EXENoNoNoYes (*, ?)Partial (only in DIR /A:... command)No
Windows CMD.EXEPartial (only through FOR /F and SET /A)NoNo95Yes (*, ?)Partial (only in DIR /A:... command)Yes (via FOR /R command, or, where available, indirectly via /S subdir option)
4DOSYes (through variable functions %@...[], extended environment variable processing, various string commands and FOR /F and SET /A)NoNoYes (*, ?, [...], extended wildcards, SELECT popup command)Yes (via /A:... attribute and /I"..." description options and /[S...] size, /[T...] time, /[D...] date, and /[!...] file exclusion ranges)Yes (via FOR /R command, or indirectly via GLOBAL command or, where available, /S subdir option)
4OS2?NoNo???
TCC (formerly 4NT)Yes (through variable functions %@...[], extended environment variable processing, various string commands and FOR /F and SET /A)NoYesYes (*, ?, [...], extended wildcards, SELECT popup command)Yes (via /A:... attribute and /I"..." description options and /[S...] size, /[T...] time, /[D...] date, /[O...] owner, and /[!...] file exclusion ranges)Yes (via FOR /R command, or indirectly via GLOBAL command or, where available, /S subdir option)
PowerShellYes (Concat/Substring/Insert/Remove/Replace, ToLower/ToUpper, Trim/TrimStart/TrimEnd, Compare, Contains/StartsWith/EndWith, Format, IndexOf/LastIndexOf, Pad/PadLeft/PadRight, Split/Join, regular expression functions and other .NET string functions)Range operator for numbers96Yes (full regex support)97Yes (*, ?, [...])??
rc??NoYesNoNo
BeanShell??Yes???
VMS DCLYesNoNoYesNoYes (via [SUBDIR...])
fishYes (builtin string function)Yesyes (via builtin string match and string replace functions)Yes (*, ?, {...})NoYes (**/...)

Inter-process communication

ShellPipesCommand substitutionProcess substitutionSubshellsTCP/UDP connections as streamsKeystroke stacking
Bourne shellbytes concurrentYesNoYesNoN/A98
POSIX shellbytes concurrentYesNoYesNoN/A99
bash (v4.0)bytes concurrentYesYes (if system supports /dev/fd/⟨n⟩ or named pipes)YesYes (client only)N/A100
cshbytes concurrentYesNoYesNoN/A101
tcshbytes concurrentYesNoYesNoN/A102
Hamilton C shellbytes concurrentYesNoYesNo?
Scshtext???YesN/A103
ksh (ksh93t+)bytes (may contain serialized objects if print -C is used) concurrentYes ($(...) and ${<space>...;})Yes (if system supports /dev/fd/⟨n⟩)YesYes (and SCTP support, client only)N/A104
pdkshbytes concurrentYesNoYesNoN/A105
zshbytes concurrentYesYesYesYes (client and server, but only TCP)N/A106
ashbytes concurrentYesNoYesNoN/A107
CCPNoNoNoNoNoNo
COMMAND.COMtext sequential temporary filesNoNoPartial (only under DR-DOS multitasker via COMMAND.COM /T)NoNo
OS/2 CMD.EXEtext concurrentNoNo?NoNo
Windows CMD.EXEtext concurrentYes (via FOR /F command)NoYes (Backtick: ` in FOR /F usebackq)NoNo
4DOStext sequential temporary filesYes (via FOR /F command)?Partial (via %@EXECSTR[] and %@EXEC[], or via SET /M, ESET /M and UNSET /M and %@MASTER[...])NoYes (via KEYSTACK and KSTACK)108
4OS2text concurrent???NoYes (via KEYSTACK)
TCC (formerly 4NT)text concurrentYes (via FOR /F command)?Partial (via %@EXECSTR[] and %@EXEC[])Yes (via FTP, TFTP, FTPS, SFTP, HTTP, HTTPS and IFTP, client only)Yes (via KEYSTACK)
PowerShellobjects concurrentYesNoYesYes?
rctext concurrentYesYes (via: <{cmd} if system supports /dev/fd/⟨n⟩)YesNo?
BeanShellnot supported???Yes?
VMS DCLtext (via PIPE command)YesNoYes (spawn)Yes (server TCP only)No
fishbytes concurrentYes (...)No (broken)109NoNoN/A110

Keystroke stacking

In anticipation of what a given running application may accept as keyboard input, the user of the shell instructs the shell to generate a sequence of simulated keystrokes, which the application will interpret as a keyboard input from an interactive user. By sending keystroke sequences the user may be able to direct the application to perform actions that would be impossible to achieve through input redirection or would otherwise require an interactive user. For example, if an application acts on keystrokes, which cannot be redirected, distinguishes between normal and extended keys, flushes the queue before accepting new input on startup or under certain conditions, or because it does not read through standard input at all. Keystroke stacking typically also provides means to control the timing of simulated keys being sent or to delay new keys until the queue was flushed etc. It also allows to simulate keys which are not present on a keyboard (because the corresponding keys do not physically exist or because a different keyboard layout is being used) and therefore would be impossible to type by a user.

Security features

ShellSecure (password) promptFile/directory passwordsExecute permissionRestricted shell subsetSafe data subset
Bourne shellvia stty111?N/A112YesNo
POSIX shellvia stty113?N/A114NoNo
bash (v4.0)read -s?N/A115YesNo
cshvia stty116?N/A117YesNo
tcshvia stty118?N/A119YesNo
Hamilton C shellNoNoNoNoNo
Scshvia stty120?N/A121NoNo
ksh (ksh93t+)via stty122?N/A123YesNo
pdkshvia stty124?N/A125YesNo
zshread -s?N/A126127YesNo
ashvia stty128?N/A129YesNo
CCPNoNoNoNoNo
COMMAND.COMPartial (only under DR-DOS, prompts for password if file/directory is protected)Partial (only under DR-DOS via \dirname;dirpwd\filename;filepwd syntax)130Partial (only under DR-DOS, if files are password-protected for read and/or execute permission)131NoNo
OS/2 CMD.EXENoNoNoNoNo
Windows CMD.EXENoNoNoNoNo
4DOSYes (via INPUT /P or INKEY /P)132Partial (only under DR-DOS via \dirname;;dirpwd\filename;;filepwd syntax)133Partial (only under DR-DOS, if files are password-protected for read and/or execute permission)134NoNo
4OS2?NoNoNoNo
TCC (formerly 4NT)Yes (via INPUT /P, INKEY /P or QUERYBOX /P)135NoNoNoNo
PowerShellYes136NoNo137Yes138Yes139
rcvia stty140?N/A141Yes142No
BeanShell?????
VMS DCLYesNoYesYesNo
fishread -s?N/A143144Yes (via fish -l)?

Secure prompt

Some shell scripts need to query the user for sensitive information such as passwords, private digital keys, PIN codes or other confidential information. Sensitive input should not be echoed back to the screen/input device where it could be gleaned by unauthorized persons. Plaintext memory representation of sensitive information should also be avoided as it could allow the information to be compromised, e.g., through swap files, core dumps etc.145

The shells bash, zsh and PowerShell offer this as a specific feature.146147 Shells which do not offer this as a specific feature may still be able to turn off echoing through some other means. Shells executing on a Unix/Linux operating system can use the stty external command to switch off/on echoing of input characters.148 In addition to not echoing back the characters, PowerShell's -AsSecureString option also encrypts the input character-by-character during the input process, ensuring that the string is never represented unencrypted in memory where it could be compromised through memory dumps, scanning, transcription etc.

Execute permission

Some operating systems define an execute permission which can be granted to users/groups for a file when the file system itself supports it.

On Unix systems, the execute permission controls access to invoking the file as a program, and applies both to executables and scripts. As the permission is enforced in the program loader, no obligation is needed from the invoking program, nor the invoked program, in enforcing the execute permission – this also goes for shells and other interpreter programs. The behaviour is mandated by the POSIX C library that is used for interfacing with the kernel. POSIX specifies that the exec family of functions shall fail with EACCESS (permission denied) if the file denies execution permission (see execve – System Interfaces Reference, The Single UNIX Specification, Version 4 from The Open Group).

The execute permission only applies when the script is run directly. If a script is invoked as an argument to the interpreting shell, it will be executed regardless of whether the user holds the execute permission for that script.

Although Windows also specifies an execute permission, none of the Windows-specific shells block script execution if the permission has not been granted.

Restricted shell subset

Several shells can be started or be configured to start in a mode where only a limited set of commands and actions is available to the user. While not a security boundary (the command accessing a resource is blocked rather than the resource) this is nevertheless typically used to restrict users' actions before logging in.

A restricted mode is part of the POSIX specification for shells, and most of the Linux/Unix shells support such a mode where several of the built-in commands are disabled and only external commands from a certain directory can be invoked.149150

PowerShell supports restricted modes through session configuration files or session configurations. A session configuration file can define visible (available) cmdlets, aliases, functions, path providers and more.151

Safe data subset

Scripts that invoke other scripts can be a security risk as they can potentially execute foreign code in the context of the user who launched the initial script. Scripts will usually be designed to exclusively include scripts from known safe locations; but in some instances, e.g. when offering the user a way to configure the environment or loading localized messages, the script may need to include other scripts/files.152 One way to address this risk is for the shell to offer a safe subset of commands which can be executed by an included script.

Notes

References

  1. A platform independent version based on the historical UNIX V7 original source code is available from Geoff Collyer http://www.collyer.net/who/geoff/v7sh.tar

  2. The historic UNIX V7 version is available under a BSD-style license through The Unix Heritage Society and others. http://minnie.tuhs.org/Archive/Caldera-license.pdf

  3. A platform independent version based on the SVr4/Solaris source code is available from Jörg Schilling https://sourceforge.net/projects/schilytools/files/

  4. Ferrell, John, "Chapter 2. Default Shell", FreeBSD Quickstart Guide for Linux Users, The FreeBSD Documentation Project, retrieved 2015-07-24 https://www.freebsd.org/doc/en_US.ISO8859-1/articles/linux-users/shells.html

  5. "SchilliX-ON / SchilliX-ON Mercurial / [b1d9a2] /usr/src/cmd/sh". Sourceforge.net. Retrieved 2015-07-02. https://sourceforge.net/p/schillix-on/schillix-on/ci/default/tree/usr/src/cmd/sh/

  6. Since mid 1990s.

  7. if compiled with -DACCT.

  8. IEEE and The Open Group (2008). IEEE 1003.1 Standard for Information Technology – Portable Operating System Interface (POSIX): Shell and Utilities, Issue 7. /wiki/IEEE

  9. As part of IEEE Std.1003.2-1992 (POSIX.2); integrated into IEEE Std.1003.1 with the 2001 revision.

  10. Fox, Brian (1989-06-07). Tower Jr., Leonard H. (ed.). "Bash is in beta release!". Newsgroup: gnu.announce. Usenet: [email protected]. Retrieved 2010-10-28. https://groups.google.com/group/gnu.announce/msg/a509f48ffb298c35?hl=en

  11. Cooper, Mendel, "Chapter 37.3.2. Bash, version 4.2", Advanced Bash-Scripting Guide, The Linux Documentation Project, retrieved 2015-04-30, "Bash now supports the \u and \U Unicode escape." http://tldp.org/LDP/abs/html/bashver4.html

  12. Greer, Ken (1983-10-03). "C shell with command and filename recognition/completion". Newsgroup: net.sources. Retrieved 2010-12-29. https://groups.google.com/group/net.sources/msg/7073bf41cc5da330?hl=en

  13. "FreeBSD Quickstart Guide for Linux® Users". FreeBSD Documentation Portal. Retrieved 2024-02-04. https://docs.freebsd.org/en/articles/linux-users/

  14. Sussman, Ann (1988-12-26). "Hamilton C Shell Speeds Development Of OS/2 Applications" (PDF). PC Week (1988-12-26 - 1989-01-02): 37. Retrieved 2010-11-22. https://hamiltonlabs.com/archives/Hamilton-C-Shell-Speeds-Development-of-OS-2-Applications-Ann-Sussman-PC-Week-Dec-26-1988.pdf

  15. Gomes, Ron (1983-06-09). "Toronto USENIX Conference Schedule (tentative)". Newsgroup: net.usenix. Retrieved 2010-12-29. https://groups.google.com/group/net.usenix/msg/fa6e1f7de3b63bba?hl=en

  16. Harris, Guy (1983-10-10). "csh question". Newsgroup: net.flame. Retrieved 2010-12-29. https://groups.google.com/group/net.flame/msg/4f868085b65af530?hl=en

  17. ksh93(1) man page https://docs.oracle.com/cd/E36784_01/html/E36870/ksh-1.html

  18. ksh93(1) man page https://docs.oracle.com/cd/E36784_01/html/E36870/ksh-1.html

  19. Default shell in OpenBSD is ksh (pdksh). http://www.openbsd.org/faq/faq10.html#rootshell

  20. Default shell in OpenBSD is ksh (pdksh). http://www.openbsd.org/faq/faq10.html#rootshell

  21. The zsh command line editor is fully configurable and can allow mouse support in various ways such as with Stéphane Chazelas's mouse.zsh. http://stchaz.free.fr/mouse.zsh

  22. zsh(1) man page and subpages http://linux.die.net/man/1/zsh

  23. zshbuiltins(1) man page http://linux.die.net/man/1/zshbuiltins

  24. Lefevre, Vincent (2015-02-11). "multi-digit file descriptors". zsh-users (Mailing list). Retrieved 2021-12-23. https://www.zsh.org/mla/users/2015/msg00211.html

  25. "#782228 - busybox sh doesn't support multibyte characters in string handling - Debian Bug report logs". Bugs.debian.org. 2015-04-09. Retrieved 2015-07-02. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782228

  26. MS-DOS and Windows component – covered by a valid license for MS-DOS or Microsoft Windows.

  27. OS/2 component – covered by a valid license for OS/2.

  28. Command extensions enabled, or "CMD /X".

  29. Windows component – covered by a valid license for Microsoft Windows.

  30. "HP OpenVMS DCL Dictionary". Archived from the original on 2007-03-25. Retrieved 2009-03-23. https://web.archive.org/web/20070325041517/http://h71000.www7.hp.com/doc/732FINAL/9996/9996pro_contents.html

  31. Microsoft PowerShell is installed by default on Windows 7 and later. It is an optional download for users of Windows Vista or Windows XP.

  32. Larabel, Michael (2021-03-23). "Plan 9 Copyright Transferred To Foundation, MIT Licensed Code Released". Phoronix. Retrieved 2021-03-28. https://www.phoronix.com/scan.php?page=news_item&px=Plan-9-2021

  33. Liljencrantz, Axel (2005-05-17). "Fish - The friendly interactive shell". Retrieved 2013-04-08. https://lwn.net/Articles/136232/

  34. Soller, Jeremy (2015-11-15). "d79c8f511573fb7710abc63b4236a40022914520". Retrieved 2019-08-03. https://gitlab.redox-os.org/redox-os/ion/commit/d79c8f511573fb7710abc63b4236a40022914520

  35. current versions from Jörg Schilling.

  36. current versions from Jörg Schilling.

  37. Alt-Shift-8 or Alt-* will expand to the full matching list of filenames.

  38. "[Z Shell] Completion System". Zsh.sourceforge.io. Retrieved 2015-02-24. https://zsh.sourceforge.io/Doc/Release/Completion-System.html

  39. This applies only on reserved words and other syntactic features.

  40. e.g. via 3rd party such as zsh-autosuggestions https://github.com/tarruda/zsh-autosuggestions

  41. zsh does not feature syntax highlighting, but a 3rd party project exists which offers this capability as an add-on: zsh-syntax-highlighting https://github.com/zsh-users/zsh-syntax-highlighting

  42. Available through the DOSKEY add-on. /wiki/DOSKEY

  43. Available in DR-DOS through HISTORY. /wiki/HISTORY_(CONFIG.SYS_directive)

  44. Paul, Matthias R. (1997-10-02) [1997-09-29]. "Caldera OpenDOS 7.01/7.02 Update Alpha 3 IBMBIO.COM - README.TXT and BOOT.TXT - A short description of how OpenDOS is booted". Archived from the original on 2003-10-04. Retrieved 2009-03-29. [1] https://web.archive.org/web/20031004074600/http://www-student.informatik.uni-bonn.de/~frinke/ibmbioa3.zip

  45. Alternatively available through the DOSKEY add-on as well. /wiki/DOSKEY

  46. Alternatively available in DR-DOS through HISTORY as well. /wiki/HISTORY_(CONFIG.SYS_directive)

  47. TCC has special prompt functions for Yes, No, Cancel, Close, Retry.

  48. Shirk, Jason (2018-02-15). "PSReadLine: A bash inspired readline implementation for PowerShell" – via GitHub. https://github.com/lzybkr/PSReadLine

  49. "Windows PowerShell 5.0". Archived from the original on 17 September 2016. Retrieved 8 September 2016. https://web.archive.org/web/20160917093943/https://msdn.microsoft.com/en-us/powershell/scripting/core-powershell/core-modules/windows-powershell-5.0

  50. "Windows PowerShell Integrated Scripting Environment (ISE)". Microsoft Technet. Retrieved 2015-09-12. https://technet.microsoft.com/en-us/library/dd819514.aspx?f=255&MSPPError=-2147217396

  51. "Get-ChildItemColor". GitHub. 2022-03-18. https://github.com/joonro/Get-ChildItemColor

  52. sdwheeler. "Write-Host (Microsoft.PowerShell.Utility) - PowerShell". docs.microsoft.com. Retrieved 2022-01-18. https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/write-host

  53. Shirk, Jason (2018-02-15). "PSReadLine: A bash inspired readline implementation for PowerShell" – via GitHub. https://github.com/lzybkr/PSReadLine

  54. "Windows PowerShell Integrated Scripting Environment (ISE)". Microsoft Technet. Retrieved 2015-09-12. https://technet.microsoft.com/en-us/library/dd819514.aspx?f=255&MSPPError=-2147217396

  55. Push-Location (with alias pushd) and Pop-Location (with alias popd) allows multiple location types (directories of file systems, organizational units of Active Directory, nodes of Windows Registry etc) to be pushed onto and popped from location stacks. https://technet.microsoft.com/en-us/library/hh849855.aspx

  56. Shirk, Jason (2018-02-15). "PSReadLine: A bash inspired readline implementation for PowerShell" – via GitHub. https://github.com/lzybkr/PSReadLine

  57. "Windows PowerShell Integrated Scripting Environment (ISE)". Microsoft Technet. Retrieved 2015-09-12. https://technet.microsoft.com/en-us/library/dd819514.aspx?f=255&MSPPError=-2147217396

  58. "Windows PowerShell Integrated Scripting Environment (ISE)". Microsoft Technet. Retrieved 2015-09-12. https://technet.microsoft.com/en-us/library/dd819514.aspx?f=255&MSPPError=-2147217396

  59. The $host.ui.PromptForChoice function allows for a menu-style prompt for choices. The prompt works from background jobs as well as from remote sessions, displaying the menu prompt on the console of the controlling session. https://technet.microsoft.com/en-us/library/ff730939.aspx

  60. The Write-Progress cmdlet writes a progress bar which can indicate percentage, remaining seconds etc. The progress bar messages work from background jobs or remote sessions in addition to interactive scripts, i.e. the progress bar is displayed on the console of the controlling session, not as part of the regular output. https://technet.microsoft.com/en-us/library/hh849902.aspx

  61. "Windows PowerShell Integrated Scripting Environment (ISE)". Microsoft Technet. Retrieved 2015-09-12. https://technet.microsoft.com/en-us/library/dd819514.aspx?f=255&MSPPError=-2147217396

  62. The Show-Command cmdlet inspects the command definition and opens an interactive windows with a named input field for each parameter/switch https://technet.microsoft.com/en-us/library/hh849915.aspx

  63. Handled by rio, GNU readline, editline or vrl. /wiki/Rio_(program)

  64. Handled by rio, GNU readline, editline or vrl. /wiki/Rio_(program)

  65. Handled by rio, GNU readline, editline or vrl. /wiki/Rio_(program)

  66. "fish: Documentation". Section Tab completion. Retrieved 2016-01-10. http://fishshell.com/docs/current/index.html#completion

  67. "fish: Documentation". Section Tab completion. Retrieved 2016-01-10. http://fishshell.com/docs/current/index.html#completion

  68. "set_color - set the terminal color — fish-shell 3.1.2 documentation". fishshell.com. Archived from the original on 2020-02-17. Retrieved 2021-02-23. https://fishshell.com/docs/current/cmds/set_color.html

  69. The fish shell is an interactive character based input/output surface.

  70. "abbr - manage fish abbreviations — fish-shell 3.1.2 documentation". fishshell.com. Retrieved 2021-02-23. https://fishshell.com/docs/current/cmds/abbr.html

  71. "zsh: 20. Completion System". Zsh.sourceforge.io. 2013-03-06. Retrieved 2013-08-18. https://zsh.sourceforge.io/Doc/Release/Completion-System.html

  72. sdwheeler. "What's New in the PowerShell 5.0 ISE - PowerShell". docs.microsoft.com. Retrieved 2021-07-25. https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/whats-new/what-s-new-in-the-powershell-50-ise

  73. "GitHub - marlonrichert/zsh-autocomplete: 🤖 Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion". GitHub. Retrieved 2021-07-25. https://github.com/marlonrichert/zsh-autocomplete

  74. "Interactive use — fish-shell 3.3.1 documentation". fishshell.com. Retrieved 2021-07-25. https://fishshell.com/docs/current/interactive.html#autosuggestions

  75. Hahn, Harley (2009). Harley Hahn's guide to Unix and Linux. Boston: McGraw-Hill Higher Education. ISBN 978-0-07-313361-4. OCLC 184828059. 978-0-07-313361-4

  76. Concurrent DOS 386 - Multiuser/Multitasking Operating System - User Guide (PDF). Digital Research. http://bitsavers.org/pdf/digitalResearch/concurrent/1126-2004-001_Concurrent_DOS_386_Users_Guide_Nov87.pdf

  77. Shirk, Jason (2018-02-15). "PSReadLine: A bash inspired readline implementation for PowerShell" – via GitHub. https://github.com/lzybkr/PSReadLine

  78. "pv(1): monitor progress of data through pipe - Linux man page". Linux.die.net. Retrieved 2015-02-24. http://linux.die.net/man/1/pv

  79. "fish: Tutorial". fishshell.com. Retrieved 2022-10-21. https://fishshell.com/docs/3.0/tutorial.html#tut_syntax_highlighting

  80. "zsh-users/zsh-syntax-highlighting: Fish shell like syntax highlighting for Zsh". GitHub. Retrieved 2013-08-18. https://github.com/zsh-users/zsh-syntax-highlighting

  81. Shirk, Jason (2018-02-15). "PSReadLine: A bash inspired readline implementation for PowerShell" – via GitHub. https://github.com/lzybkr/PSReadLine

  82. sdwheeler. "PSReadLine Module - PowerShell". learn.microsoft.com. Retrieved 2023-04-26. https://learn.microsoft.com/en-us/powershell/module/psreadline/

  83. current versions from Jörg Schilling.

  84. Introduce 'function' built-in by Matheus Garcia https://github.com/tcsh-org/tcsh/pull/77

  85. "Ash Variants". Archived from the original on 2010-03-10. Retrieved 2014-12-15. https://web.archive.org/web/20100310193527/http://www.in-ulm.de/~mascheck/various/ash/

  86. "Set - Environment Variable - Windows CMD". SS64.com. Retrieved 2015-02-24. https://ss64.com/nt/set.html

  87. "How to loop through array in batch?". Stack Overflow. Retrieved 2015-02-24. https://stackoverflow.com/questions/18462169/how-to-loop-through-array-in-batch

  88. The .NET System.Math class defines mathematical functions that can be used through the shortcut [Math], e.g. [Math]::Sin for the sinus function.[2] https://technet.microsoft.com/en-us/library/dd347632.aspx

  89. "Get closure with GetNewClosure". devblogs.microsoft.com. 2009-03-27. Retrieved 2022-09-12. https://devblogs.microsoft.com/powershell/get-closure-with-getnewclosure/

  90. "string - manipulate strings — fish-shell 3.1.2 documentation". fishshell.com. Retrieved 2021-02-23. https://fishshell.com/docs/current/cmds/string.html

  91. Hamilton C shell Language reference: Wildcarding and pattern matching, Hamilton Laboratories, retrieved 2013-10-29, ... Indefinite Directory: match any number of directory levels – zero or more – whatever it takes to make the rest of the pattern match. https://hamiltonlabs.com/UserGuide/31-Wildcarding.htm

  92. Seebach, Peter (2008-11-21). Beginning Portable Shell Scripting: From Novice to Professional. Expert's voice in open source. Apress (published 2008). p. 149. ISBN 9781430210436. Retrieved 2014-09-17. Brace expansion is available in ksh93, pdksh, bash, and zsh. 9781430210436

  93. Seebach, Peter (2008-11-21). Beginning Portable Shell Scripting: From Novice to Professional. Expert's voice in open source. Apress (published 2008). p. 149. ISBN 9781430210436. Retrieved 2014-09-17. Brace expansion is available in ksh93, pdksh, bash, and zsh. 9781430210436

  94. Zsh offers a variety of globbing options. https://zsh.sourceforge.io/Guide/zshguide05.html#l135

  95. Not available as a shell built-in. External FINDSTR /R command is available in most Windows releases.

  96. sdwheeler. "about Operators - PowerShell". docs.microsoft.com. Retrieved 2022-01-18. https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_operators

  97. PowerShell leverages the full .NET regular expression engine which features named captures, zero-width lookahead/-behind, greedy/non-greedy, character classes, level counting etc. /wiki/.NET_Framework

  98. xautomation and xdotool can be used to generate keystrokes under X Window System; or a program can be run in a pseudoterminal to be able to control it (as with the expect tool). /wiki/X_Window_System

  99. xautomation and xdotool can be used to generate keystrokes under X Window System; or a program can be run in a pseudoterminal to be able to control it (as with the expect tool). /wiki/X_Window_System

  100. xautomation and xdotool can be used to generate keystrokes under X Window System; or a program can be run in a pseudoterminal to be able to control it (as with the expect tool). /wiki/X_Window_System

  101. xautomation and xdotool can be used to generate keystrokes under X Window System; or a program can be run in a pseudoterminal to be able to control it (as with the expect tool). /wiki/X_Window_System

  102. xautomation and xdotool can be used to generate keystrokes under X Window System; or a program can be run in a pseudoterminal to be able to control it (as with the expect tool). /wiki/X_Window_System

  103. xautomation and xdotool can be used to generate keystrokes under X Window System; or a program can be run in a pseudoterminal to be able to control it (as with the expect tool). /wiki/X_Window_System

  104. xautomation and xdotool can be used to generate keystrokes under X Window System; or a program can be run in a pseudoterminal to be able to control it (as with the expect tool). /wiki/X_Window_System

  105. xautomation and xdotool can be used to generate keystrokes under X Window System; or a program can be run in a pseudoterminal to be able to control it (as with the expect tool). /wiki/X_Window_System

  106. xautomation and xdotool can be used to generate keystrokes under X Window System; or a program can be run in a pseudoterminal to be able to control it (as with the expect tool). /wiki/X_Window_System

  107. xautomation and xdotool can be used to generate keystrokes under X Window System; or a program can be run in a pseudoterminal to be able to control it (as with the expect tool). /wiki/X_Window_System

  108. Brothers, Hardin; Rawson, Tom; Conn, Rex C.; Paul, Matthias R.; Dye, Charles E.; Georgiev, Luchezar I. (2002-02-27). 4DOS 8.00 online help. /wiki/Tom_Rawson

  109. "find a way to make 'psub --fifo' safe from deadlock · Issue #1040 · fish-shell/fish-shell". GitHub. https://github.com/fish-shell/fish-shell/issues/1040

  110. xautomation and xdotool can be used to generate keystrokes under X Window System; or a program can be run in a pseudoterminal to be able to control it (as with the expect tool). /wiki/X_Window_System

  111. The shell can use the stty utility to suppress echoing of typed characters to the screen. This requires multiple steps: 1. reading the current echo state, 2. switching echo off, 3. reading the input, 4. switching echo state back to the original state.

  112. The execute permission is enforced by a separate program, the program loader, by refusing to invoke the interpreter (possibly a shell) specified by the script's hashbang. The interpreter does not enforce the execute permission if invoked directly as the program loader would, with the file as an argument; this only requires read permission, as does piping the file as input to the interpreter, in which case the interpreter cannot see the execute permission. /wiki/Hashbang

  113. The shell can use the stty utility to suppress echoing of typed characters to the screen. This requires multiple steps: 1. reading the current echo state, 2. switching echo off, 3. reading the input, 4. switching echo state back to the original state.

  114. The execute permission is enforced by a separate program, the program loader, by refusing to invoke the interpreter (possibly a shell) specified by the script's hashbang. The interpreter does not enforce the execute permission if invoked directly as the program loader would, with the file as an argument; this only requires read permission, as does piping the file as input to the interpreter, in which case the interpreter cannot see the execute permission. /wiki/Hashbang

  115. The execute permission is enforced by a separate program, the program loader, by refusing to invoke the interpreter (possibly a shell) specified by the script's hashbang. The interpreter does not enforce the execute permission if invoked directly as the program loader would, with the file as an argument; this only requires read permission, as does piping the file as input to the interpreter, in which case the interpreter cannot see the execute permission. /wiki/Hashbang

  116. The shell can use the stty utility to suppress echoing of typed characters to the screen. This requires multiple steps: 1. reading the current echo state, 2. switching echo off, 3. reading the input, 4. switching echo state back to the original state.

  117. The execute permission is enforced by a separate program, the program loader, by refusing to invoke the interpreter (possibly a shell) specified by the script's hashbang. The interpreter does not enforce the execute permission if invoked directly as the program loader would, with the file as an argument; this only requires read permission, as does piping the file as input to the interpreter, in which case the interpreter cannot see the execute permission. /wiki/Hashbang

  118. The shell can use the stty utility to suppress echoing of typed characters to the screen. This requires multiple steps: 1. reading the current echo state, 2. switching echo off, 3. reading the input, 4. switching echo state back to the original state.

  119. The execute permission is enforced by a separate program, the program loader, by refusing to invoke the interpreter (possibly a shell) specified by the script's hashbang. The interpreter does not enforce the execute permission if invoked directly as the program loader would, with the file as an argument; this only requires read permission, as does piping the file as input to the interpreter, in which case the interpreter cannot see the execute permission. /wiki/Hashbang

  120. The shell can use the stty utility to suppress echoing of typed characters to the screen. This requires multiple steps: 1. reading the current echo state, 2. switching echo off, 3. reading the input, 4. switching echo state back to the original state.

  121. The execute permission is enforced by a separate program, the program loader, by refusing to invoke the interpreter (possibly a shell) specified by the script's hashbang. The interpreter does not enforce the execute permission if invoked directly as the program loader would, with the file as an argument; this only requires read permission, as does piping the file as input to the interpreter, in which case the interpreter cannot see the execute permission. /wiki/Hashbang

  122. The shell can use the stty utility to suppress echoing of typed characters to the screen. This requires multiple steps: 1. reading the current echo state, 2. switching echo off, 3. reading the input, 4. switching echo state back to the original state.

  123. The execute permission is enforced by a separate program, the program loader, by refusing to invoke the interpreter (possibly a shell) specified by the script's hashbang. The interpreter does not enforce the execute permission if invoked directly as the program loader would, with the file as an argument; this only requires read permission, as does piping the file as input to the interpreter, in which case the interpreter cannot see the execute permission. /wiki/Hashbang

  124. The shell can use the stty utility to suppress echoing of typed characters to the screen. This requires multiple steps: 1. reading the current echo state, 2. switching echo off, 3. reading the input, 4. switching echo state back to the original state.

  125. The execute permission is enforced by a separate program, the program loader, by refusing to invoke the interpreter (possibly a shell) specified by the script's hashbang. The interpreter does not enforce the execute permission if invoked directly as the program loader would, with the file as an argument; this only requires read permission, as does piping the file as input to the interpreter, in which case the interpreter cannot see the execute permission. /wiki/Hashbang

  126. The execute permission is enforced by a separate program, the program loader, by refusing to invoke the interpreter (possibly a shell) specified by the script's hashbang. The interpreter does not enforce the execute permission if invoked directly as the program loader would, with the file as an argument; this only requires read permission, as does piping the file as input to the interpreter, in which case the interpreter cannot see the execute permission. /wiki/Hashbang

  127. The zsh and fish shells also honor the execute permission for command completion.

  128. The shell can use the stty utility to suppress echoing of typed characters to the screen. This requires multiple steps: 1. reading the current echo state, 2. switching echo off, 3. reading the input, 4. switching echo state back to the original state.

  129. The execute permission is enforced by a separate program, the program loader, by refusing to invoke the interpreter (possibly a shell) specified by the script's hashbang. The interpreter does not enforce the execute permission if invoked directly as the program loader would, with the file as an argument; this only requires read permission, as does piping the file as input to the interpreter, in which case the interpreter cannot see the execute permission. /wiki/Hashbang

  130. Under DR-DOS the password separator for file and directory passwords is a semicolon. This is also supported under 4DOS for as long as the command does not support include lists. Under 4DOS, the password separator must be doubled for all commands supporting include lists in order to distinguish passwords from include lists. Commands not supporting include lists accept both forms. DR-DOS 7.02 and higher optionally accept a doubled semicolon as well, so that doubled semicolons work under both COMMAND.COM and 4DOS regardless of the command executed.

  131. DR-DOS supports file passwords for read/write/delete and optionally execute permissions. Files are not protected by default, but the system can be set up so that f.e. batch scripts require a password to read.

  132. INPUT /P and INKEY /P echoes back asterisks for each typed character.

  133. Under DR-DOS the password separator for file and directory passwords is a semicolon. This is also supported under 4DOS for as long as the command does not support include lists. Under 4DOS, the password separator must be doubled for all commands supporting include lists in order to distinguish passwords from include lists. Commands not supporting include lists accept both forms. DR-DOS 7.02 and higher optionally accept a doubled semicolon as well, so that doubled semicolons work under both COMMAND.COM and 4DOS regardless of the command executed.

  134. DR-DOS supports file passwords for read/write/delete and optionally execute permissions. Files are not protected by default, but the system can be set up so that f.e. batch scripts require a password to read.

  135. INPUT /P and INKEY /P echoes back asterisks for each typed character.

  136. Read-Host -AsSecureString reads a string of characters from the input device into an encrypted string, one character at a time thus ensuring that there is no memory image of the clear text which could be gleaned from scanning memory, or from crash dumps, memory dumps, paging files, log files or similar.

  137. PowerShell script files (.ps1 files) are by default associated with the Notepad editor, not with the PowerShell execution engine. Invoking a .ps1 file will launch Notepad rather than executing the script.

  138. Startup scripts per computer/user can import modules and expose a subset the commands/functions available in the modules.

  139. "About Data Sections". Technet.microsoft.com. Retrieved 2015-02-24. https://technet.microsoft.com/en-us/library/hh848302.aspx

  140. The shell can use the stty utility to suppress echoing of typed characters to the screen. This requires multiple steps: 1. reading the current echo state, 2. switching echo off, 3. reading the input, 4. switching echo state back to the original state.

  141. The execute permission is enforced by a separate program, the program loader, by refusing to invoke the interpreter (possibly a shell) specified by the script's hashbang. The interpreter does not enforce the execute permission if invoked directly as the program loader would, with the file as an argument; this only requires read permission, as does piping the file as input to the interpreter, in which case the interpreter cannot see the execute permission. /wiki/Hashbang

  142. "Ubuntu Manpage: rc - shell". Manpages.ubuntu.com. 2003-07-17. Retrieved 2015-02-24. http://manpages.ubuntu.com/manpages/precise/man1/rc.1.html

  143. The execute permission is enforced by a separate program, the program loader, by refusing to invoke the interpreter (possibly a shell) specified by the script's hashbang. The interpreter does not enforce the execute permission if invoked directly as the program loader would, with the file as an argument; this only requires read permission, as does piping the file as input to the interpreter, in which case the interpreter cannot see the execute permission. /wiki/Hashbang

  144. The zsh and fish shells also honor the execute permission for command completion.

  145. Provos, Niels. "Encrypting Virtual Memory". Center for Information Technology Integration, University of Michigan. Retrieved 2012-12-20. http://www.openbsd.org/papers/swapencrypt.ps

  146. "bash - GNU Bourne-Again SHell". read -s Silent mode. If input is coming from a terminal, characters are not echoed. https://www.gnu.org/software/bash/manual/html_node/Bash-Builtins.html

  147. "Using the Read-Host Cmdlet". By adding the -assecurestring parameter you can mask the data entered at the prompt https://technet.microsoft.com/en-us/library/ee176935.aspx

  148. "Linux / Unix Command: stty". Linux.about.com. Archived from the original on 2015-02-25. Retrieved 2015-02-24. https://web.archive.org/web/20150225005431/http://linux.about.com/od/commands/l/blcmdl1_stty.htm

  149. "man sh - shell, the standard command language interpreter / posix" (in French). Pwet.fr. Archived from the original on 2014-12-21. Retrieved 2013-08-18. https://web.archive.org/web/20141221210713/http://pwet.fr/man/linux/commandes/posix/sh

  150. "Bash Reference Manual: The Restricted Shell". Gnu.org. 2010-12-28. Retrieved 2013-08-18. https://www.gnu.org/software/bash/manual/html_node/The-Restricted-Shell.html

  151. "New-PSSessionConfigurationFile". Technet.microsoft.com. Retrieved 2013-08-18. https://technet.microsoft.com/en-us/library/hh849712.aspx

  152. Albing, Carl; Vossen, J. P.; Newham, Cameron (2007). Bash cookbook (1st ed.). Sebastopol, California, USA: O'Reilly Media. ISBN 978-0-596-52678-8. [...] is hardly what one thinks of as a passive list of configured variables. It can run other commands (e.g., cat) and use if statements to vary its choices. It even ends by echoing a message. Be careful when you source something, as it's a wide open door into your script. 978-0-596-52678-8