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!
==String processing and filename matching== {{sort-under}} {| class="wikitable sortable sort-under" style="width: auto; text-align: center; font-size: smaller;" |- !Shell !String processing ![[Alternation (string expansion)|Alternation]] ([[Brace expansion]]) !Pattern matching ([[regular expression]]s built-in) !Pattern matching (filename [[glob (programming)|globbing]]) !Globbing qualifiers (filename generation based on file attributes) ![[Recursive globbing]] (generating files from any level of subdirectories) |- ![[Bourne shell]] 1977 version |? |{{no}} |{{no}} |{{yes}}<br>{{small|({{mono|*}}, {{mono|?}}, {{mono|[...]}})}} |{{no}} |{{no}} |- ![[Bourne shell]] recent version |{{partial}} (prefix and suffix stripping in variable expansion) |{{no}} |{{no}} |{{yes}}<br>{{small|({{mono|*}}, {{mono|?}}, {{mono|[...]}})}} |{{no}} |{{no}} |- ![[POSIX]] shell |{{partial}} (prefix and suffix stripping in variable expansion) |{{no}} |{{no}} |{{yes}}<br>{{small|({{mono|*}}, {{mono|?}}, {{mono|[...]}})}} |{{no}} |{{no}} |- ![[Bash (Unix shell)|bash]] (v4.0) |{{partial}} (prefix and suffix stripping in variable expansion) |{{yes}} |{{yes}} |{{yes}}<br>{{small|({{mono|*}}, {{mono|?}}, {{mono|[...]}}, {{mono|{...}}})}} |{{no}} |{{yes}} ({{mono|**/...}}) |- ![[C shell|csh]] |{{yes}}<br>{{small|(:s and other editing operators)}} |{{yes}} |{{no}} |{{yes}} |{{no}} |{{no}} |- ![[tcsh]] |{{yes}}<br>{{small|(:s and other editing operators)}} |{{yes}} |{{yes}} |{{yes}} |{{no}} |{{no}} |- ![[Hamilton C shell]] |{{yes}}<br>{{small|(:s and other editing operators + substr, strlen, strindex, printf, reverse, upper, lower, concat and other builtin functions)}} |{{yes}} |{{no}} |{{yes}} |{{no}} |{{yes}}<br>{{small|(via indefinite directory {{mono|"..."}} wildcard<ref>{{Citation |url=https://hamiltonlabs.com/UserGuide/31-Wildcarding.htm |title=Hamilton C shell Language reference: Wildcarding and pattern matching |access-date=2013-10-29 |publisher=Hamilton Laboratories |quote={{mono|...}} Indefinite Directory: match any number of directory levels β zero or more β whatever it takes to make the rest of the pattern match.}}</ref>)}} |- ![[Scsh]] |? |? |{{yes}} |{{yes}} |{{no}} |{{no}} |- ![[Korn Shell|ksh]] (ksh93t+) |{{partial}} (prefix, suffix stripping and string replacement in variable expansion) |{{yes}}<ref name="Apress">{{cite book |author-last1=Seebach |author-first1=Peter |title=Beginning Portable Shell Scripting: From Novice to Professional |url=https://books.google.com/books?id=53zaxy423xcC |series=Expert's voice in open source |date=21 November 2008 |publisher=Apress |publication-date=2008 |page=149 |isbn=9781430210436 |access-date=2014-09-17 |quote=Brace expansion is available in ksh93, pdksh, bash, and zsh.}}</ref> |{{yes}} |{{yes}}<br>{{small|({{mono|*}}, {{mono|?}}, {{mono|[...]}})}} |{{no}} |{{yes}} (with {{mono|set -G}}, no following of symlinks) |- ![[pdksh]] |? |{{yes}}<ref name="Apress"/> |{{no}} |{{yes}} |{{no}} |{{no}} |- ![[zsh]] |{{yes}} (through variable processing: e.g. substring extraction, various transformations via parameter expansion) |{{yes}} |{{yes}} |{{yes}}<br>{{small|({{mono|*}}, {{mono|?}}, {{mono|[...]}}, [[extended globbing]]<ref name="extended globbing">Zsh offers a variety of [https://zsh.sourceforge.io/Guide/zshguide05.html#l135 globbing options].</ref>)}} |{{yes}} |{{yes}} ({{mono|**/...}} or {{mono|***/...}} to follow symlinks) |- ![[Almquist shell|ash]] |? |? |{{no}} |{{yes}} |{{no}} |{{no}} |- ![[CCP (CP/M)|CCP]] |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |{{no}} |- ![[COMMAND.COM]] |{{no}} |{{no}} |{{no}} |{{yes}}<br>{{small|({{mono|*}}, {{mono|?}})}} |{{no}} |{{no}} |- !OS/2 [[CMD.EXE]] |{{no}} |{{no}} |{{no}} |{{yes}}<br>{{small|({{mono|*}}, {{mono|?}})}} |{{partial}} (only in {{mono|DIR /A:...}} command) |{{no}} |- !Windows [[CMD.EXE]] |{{partial}} (only through {{mono|FOR /F}} and {{mono|SET /A}}) |{{no}} |{{no|No<ref group="nb">Not available as a shell built-in. External {{mono|FINDSTR /R}} command is available in most Windows releases.</ref>}} |{{yes}}<br>{{small|({{mono|*}}, {{mono|?}})}} |{{partial}} (only in {{mono|DIR /A:...}} command) |{{yes}} (via {{mono|FOR /R}} command, or, where available, indirectly via {{mono|/S}} subdir option) |- ![[4DOS]] |{{yes}} (through variable functions {{mono|%@...[]}}, extended environment variable processing, various string commands and {{mono|FOR /F}} and {{mono|SET /A}}) |{{no}} |{{no}} |{{yes}}<br>{{small|({{mono|*}}, {{mono|?}}, {{mono|[...]}}, [[extended wildcards]], {{mono|SELECT}} popup command)}} |{{yes}} (via {{mono|/A:...}} attribute and {{mono|/I"..."}} description options and {{mono|/[S...]}} size, {{mono|/[T...]}} time, {{mono|/[D...]}} date, and {{mono|/[!...]}} file exclusion ranges) |{{yes}} (via {{mono|FOR /R}} command, or indirectly via {{mono|GLOBAL}} command or, where available, {{mono|/S}} subdir option) |- ![[4OS2]] |? |{{no}} |{{no}} |? |? |? |- ![[Take Command Console|TCC]] (formerly 4NT) |{{yes}} (through variable functions {{mono|%@...[]}}, extended environment variable processing, various string commands and {{mono|FOR /F}} and {{mono|SET /A}}) |{{no}} |{{yes}} |{{yes}}<br>{{small|({{mono|*}}, {{mono|?}}, {{mono|[...]}}, [[extended wildcards]], {{mono|SELECT}} popup command)}} |{{yes}} (via {{mono|/A:...}} attribute and {{mono|/I"..."}} description options and {{mono|/[S...]}} size, {{mono|/[T...]}} time, {{mono|/[D...]}} date, {{mono|/[O...]}} owner, and {{mono|/[!...]}} file exclusion ranges) |{{yes}} (via {{mono|FOR /R}} command, or indirectly via {{mono|GLOBAL}} command or, where available, {{mono|/S}} subdir option) |- ![[Windows PowerShell|PowerShell]] |{{yes}}<br>{{small|(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)}} |{{partial|Range operator for numbers<ref>{{Cite web | title = about Operators - PowerShell | author = sdwheeler | work = docs.microsoft.com | date = | access-date = 18 January 2022 | url = https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_operators | quote = }}</ref>}} |{{yes}}<br>{{small|(full regex support)<ref group="nb">PowerShell leverages the full [[.NET Framework|.NET]] regular expression engine which features named captures, zero-width lookahead/-behind, greedy/non-greedy, character classes, level counting etc.</ref>}} |{{yes}}<br>{{small|({{mono|*}}, {{mono|?}}, {{mono|[...]}})}} |? |? |- ![[Rc (Unix shell)|rc]] |? |? |{{no}} |{{yes}} |{{no}} |{{no}} |- ![[BeanShell]] |? |? |{{yes}} |? |? |? |- ![[DIGITAL Command Language|VMS DCL]] |{{yes}} |{{no}} |{{no}} |{{yes}} |{{no}} |{{yes}} (via {{mono|[SUBDIR...]}}) |- ![[friendly interactive shell|fish]] |{{yes}}<br>{{small|(builtin string function)}} |{{yes|Yes}} |{{yes}}<br>{{small|(via builtin {{mono|string match}} and {{mono|string replace}} functions)}} |{{yes}}<br>{{small|({{mono|*}}, {{mono|?}}, {{mono|{...}}})}} |{{no}} |{{yes}} ({{mono|**/...}}) |}
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)