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
Comparison of command shells
(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!
==Programming features== {{sort-under}} {| class="wikitable sortable sort-under" style="width: auto; text-align: center; font-size: smaller;" |- !Shell ![[Subroutine|Functions]] ![[Exception handling]] !Search & replace<br/>on variable substi­tutions !{{verth|[[Arithmetic]]}} !{{verth|[[Floating point]]}} !Math function library ![[Array data type|Linear arrays]] or [[List (abstract data type)|lists]] !{{verth|[[Associative array|Assoc­iative<br/>arrays]]}} !{{verth|[[Lambda calculus|Lambda<br/>functions]]}} !{{verth|[[eval|eval<br/>function]]}} ![[Pseudorandom number generator|Pseudo­random number generation]] ![[Bytecode]] |- ![[Bourne shell]] 1977 version |{{no}} |{{yes| Yes (via {{mono|trap}})}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{no}} |- ![[Bourne shell]] current version |{{yes| Yes since SVR2}} |{{yes| Yes (via {{mono|trap}})}} |{{no}} |{{yes}}<ref group="nb" name="ReferenceB"/> |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{no}} |- ![[POSIX]] shell |{{yes}} |{{yes| Yes (via {{mono|trap}})}} |{{no}} |{{yes}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{no}} |- ![[Bash (Unix shell)|bash]] (v4.0) |{{yes}} |{{yes| Yes (via {{mono|trap}})}} |{{yes}}<br>{{small|(via {{mono|${//}}} syntax)}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{yes}} |{{no}} |{{yes}} |{{yes}}<br>{{small|({{mono|$RANDOM}}) }} |{{no}} |- ![[C shell|csh]] |{{no}} |{{no}} |{{yes}}<br>{{small|(via {{mono|$var:s///}} syntax)}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{no}} |- ![[tcsh]] |{{partial|Work in progress<ref>[https://github.com/tcsh-org/tcsh/pull/77 ''Introduce 'function' built-in''] by Matheus Garcia</ref>}} |{{no}} |{{yes}}<br>{{small|(via {{mono|$var:s///}} syntax)}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{no}} |- ![[Hamilton C shell]] |{{yes}} |{{no}} |{{yes}}<br>{{small|(via {{mono|$var:s///}} syntax)}} |{{yes}} |{{yes}} |{{yes}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{yes| Yes (random utility)}} |{{no}} |- ![[Scsh]] |{{yes}} |? |{{yes}}<br>{{small|(via string functions and regular expressions)}} |? |? |? |{{yes}} |? |{{yes}} |{{yes}} |{{yes}}<br>{{small|(random-integer, random-real)}} |{{yes}}<br>{{small|(compiler is Scheme48 virtual machine, via {{mono|scshvm}})}} |- ![[Korn Shell|ksh]] (ksh93t+) |{{yes}} |{{yes| Yes (via {{mono|trap}})}} |{{yes}}<br>{{small|(via {{mono|${//}}} syntax and builtin commands)}} |{{yes}} |{{yes}} |{{yes}} |{{yes}} |{{yes}} |{{no}} |{{yes}} |{{yes}}<br>{{small|({{mono|$RANDOM}})}} |{{yes}}<br>{{small|(compiler is called {{mono|shcomp}})}} |- ![[pdksh]] |{{yes}} |{{yes| Yes (via {{mono|trap}})}} |{{no}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{yes}}<br>{{small|({{mono|$RANDOM}})}} |{{no}} |- ![[zsh]] |{{yes}} |{{yes}} |{{yes}}<br>{{small|(via {{mono|${:s//}}} and {{mono|${//}}} syntax)}} |{{yes}} |{{yes}} |{{yes}}<br>{{small|({{mono|zsh/mathfunc}} module)}} |{{yes}} |{{yes}} |{{no}} |{{yes}} |{{yes}}<br>{{small|({{mono|$RANDOM}})}} |{{yes}}<br>{{small|(built-in {{mono|zcompile}} command)}} |- ![[Almquist shell|ash]] |{{yes}} |{{yes}} (via {{mono|trap}}) |{{no}} |{{yes}}<br>{{small|(since 1992)<ref>{{Cite web |url=http://www.in-ulm.de/~mascheck/various/ash/ |title=Ash Variants |access-date=15 December 2014 |archive-url=https://web.archive.org/web/20100310193527/http://www.in-ulm.de/~mascheck/various/ash/ |archive-date=10 March 2010 |url-status=dead }}</ref>}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{no}} |- ![[CCP (CP/M)|CCP]] |{{no}} |? |{{no}} |{{no}} |? |? |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |- ![[COMMAND.COM]] |{{no}} |{{partial}} (only Auto-fail (via {{mono|COMMAND /F}} (or {{mono|/N}} in some versions of DR-DOS)) |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |- !OS/2 [[CMD.EXE]] |{{no}} |{{no}} |{{no}} |? |{{no}} |{{no}} |? |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |- !Windows [[CMD.EXE]] |{{yes}}<br>{{small|(via {{mono|CALL :label}})}} |{{no}} |{{yes}}<br>{{small|(via {{mono|SET %''varname'':''expression''}} syntax)}} |{{yes}}<br>{{small|(via {{mono|SET /A}})<ref>{{cite web |url=https://ss64.com/nt/set.html |title=Set - Environment Variable - Windows CMD |publisher=SS64.com |access-date=2015-02-24}}</ref>}} |{{no}} |{{no}} |{{yes}}<br>{{small|(via {{mono|SET}}<ref>{{cite web |url=https://stackoverflow.com/questions/18462169/how-to-loop-through-array-in-batch |title=How to loop through array in batch? |publisher=Stack Overflow |access-date=2015-02-24}}</ref>)}} |{{no}} |{{no}} |{{no}} |{{yes}}<br>{{small|({{mono|%random%}})}} |{{no}} |- ![[4DOS]] |{{yes}} |{{yes}}<br>{{small|(via {{mono|ON}} command, optional Auto-fail via {{mono|4DOS /F}})}} |{{yes}}<br>{{small|(via {{mono|%@Replace[...]}} function)}} |{{yes}}<br>{{small|(via {{mono|SET /A}})}} |? |? |{{yes}}<br>{{small|(via ranges, include lists, {{mono|@}}file lists and {{mono|FOR}} command)}} |{{no}} |{{no}} |{{yes}} |{{yes}}<br>{{small|({{mono|%@Random[...]}} function)}} |{{yes}}<br>{{small|(via {{mono|BATCOMP}} command)}} |- ![[4OS2]] |? |? |? |? |? |? |? |? |{{no}} |{{yes}} |{{yes}} ({{mono|%@Random[...]}} function) |? |- ![[Take Command Console|TCC]] (formerly 4NT) |{{yes}} |{{yes}}<br>{{small|(via {{mono|ON}} and various {{mono|...MONITOR}} commands)}} |{{yes}}<br>{{small|(via {{mono|%@Replace[...]}} function)}} |{{yes}}<br>{{small|(via {{mono|SET /A}})}} |? |? |{{yes}}<br>{{small|(via ranges, include lists, {{mono|@}}file lists and {{mono|FOR}} command)}} |? |{{no}} |{{yes}} |{{yes}} ({{mono|%@Random[...]}} function) |{{yes}} (via {{mono|BATCOMP}} command) |- ![[Windows PowerShell|PowerShell]] |{{yes}} |{{yes}} (Try-Catch-Finally) |{{yes}}<br>{{small|({{mono|-replace}} operator)}} |{{yes}} |{{yes}} |{{yes|[Math] class}}<ref>The .NET ''System.Math'' class defines mathematical functions that can be used through the shortcut {{mono|[Math]}}, e.g. {{mono|[Math]::Sin}} for the ''sinus'' function.[https://technet.microsoft.com/en-us/library/dd347632.aspx]</ref> |{{yes}} |{{yes}} |{{yes}}<ref>{{cite web |url=https://devblogs.microsoft.com/powershell/get-closure-with-getnewclosure/ |title=Get closure with GetNewClosure |date=2009-03-27 |website=devblogs.microsoft.com |access-date=2022-09-12}}</ref> |{{yes}} |{{yes}} |{{yes|Yes, automatic}} |- ![[Rc (Unix shell)|rc]] |{{yes}} |{{yes}} |{{no}} |{{yes}} |? |? |{{yes}} |? |{{no}} |{{yes}} |{{no}} |{{no}} |- ![[BeanShell]] |{{yes}} |{{yes}} |? |{{yes}} |? |? |{{yes}} |{{yes}} |{{no}} |{{yes}} |{{yes}} |{{yes}} |- ![[DIGITAL Command Language|VMS DCL]] |{{yes}} |{{yes}} |{{no}} |{{yes}} |{{no}} |{{yes|yes, for compiled programs}} |{{yes}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |- ![[friendly interactive shell|fish]] |{{yes}} |{{yes| Yes (via {{mono|trap}})}} |{{yes|Yes, via {{mono|string}} builtin command<ref>{{Cite web|title=string - manipulate strings β fish-shell 3.1.2 documentation|url=https://fishshell.com/docs/current/cmds/string.html|access-date=2021-02-23|website=fishshell.com}}</ref>}} |{{yes}} |{{yes}} |{{yes}} |{{yes}} |{{no}} |{{no}} |{{yes}} |{{yes}}<br>{{small|({{mono|random}})}} |{{no}} |}
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)