FACTOID # 68: Canada lays claim to more water than any other nation.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Comparison of computer shells

A shell is a computer program which interacts with the userland and subsequently the kernel of an operating system. This comparison is of shells which use the command line to serve their purpose, rather than a graphical interface. The introduction to this article provides insufficient context for those unfamiliar with the subject matter. ... A kernel connects the application software to the hardware of a computer. ...

bash (v3.1) csh ksh (ksh93s+) pdksh zsh ash Windows
cmd.exe[1]
4NT Windows PowerShell COMMAND.COM 4DOS OS/2
cmd.exe
rc BeanShell Python shell Ruby shell
Usual environment POSIX POSIX POSIX POSIX POSIX POSIX Win32 Win32 .NET MS-DOS MS-DOS OS/2 Plan 9, POSIX Java Python Ruby
Tab completion Yes (extendable) Yes Yes (extendable) Yes Yes (extendable) Yes Yes Yes Yes (extendable) No[2] Yes Yes Handled by rio, GNU readline, editline or vrl  ? Yes (provided by the rlcompleter module or IPython) Yes
Pipes Yes (concurrent) Yes (concurrent) Yes (concurrent) Yes (concurrent) Yes (concurrent) Yes (concurrent) Yes (concurrent) Yes Yes (.NET objects) Yes (sequential, with temporary files) Yes (sequential, with temporary files) Yes (concurrent) Yes (concurrent)  ? Yes Yes
Integer arithmetic Yes (via $(( )) syntax)  ? Yes (via $(( )), (( )) and let syntax) Yes (via $(( )) syntax) Yes (via $(( )) syntax) No Yes (via "set /a") Yes (via %@eval[ ] function) Yes No Yes (via %@eval[ ] function) No No Yes Yes Yes
Floating point arithmetic No No Yes (including C99-style extensions) No Yes No No Yes (via %@eval[ ] function) Yes No Yes (via %@eval[ ] function) No No Yes Yes Yes
Hash tables No No Yes (via associative arrays) No Yes No No No Yes No No No No Yes Yes Yes
Regular expressions Yes No Yes No Yes No No Limited support Yes No No No Yes Yes Yes Yes
Pattern Matching (wildcards) Yes (*, ?, [...]) Yes Yes (*, ?, [...], regexp, perl regexp, etc.) Yes Yes (*, ?, [...], etc...) Yes Yes (*, ?) Yes (*, ?, [...]) Yes (*, ?, [...]) Yes (*, ?) Yes (*, ?, [...]) Yes (*, ?) Yes  ? Yes (fnmatch and glob modules and regexp)  ?
Command history Yes Yes Yes Yes Yes No Yes (F7) Yes Yes No (added via DOSKey)[2] Yes Yes Handled by rio, GNU readline, editline or vrl  ? Yes Yes
History completion Yes Yes Yes  ? Yes No Yes (F8) Yes Yes (F8) No (added via DOSKey)[2] Yes  ? Handled by rio, GNU readline, editline or vrl  ? Yes (provided by IPython)  ?
Spell checking No No No No Yes No No No Yes No No No No  ? No  ?
Default user prompt[3] bash-3.00$ % $ $ % $ C:> [C:] PS> C:> c:> > term%, ; bsh % >>> irb(main):001:0>
Custom command prompt Yes (variable: $PS1) Yes (variable: $prompt Yes (variable: $PS1, and more) Yes (variable: $PS1) Yes (variable: $PS1, and more) Yes (variable: $PS1) Yes (environment variable: %PROMPT%) Yes (environment variable: %PROMPT) Yes (function: prompt) Yes (environment variable: %PROMPT%) Yes (environment variable: %PROMPT)  ? Yes (function prompt, or variable $prompt)  ? Yes (variable: sys.ps1)  ?
Exception handling Yes (via trap)  ? Yes (via trap)  ? Yes Yes (via trap) No No Yes No No No Yes Yes Yes Yes
One-dimensional array variables Yes  ? Yes  ? Yes No No No Yes No No No Yes Yes Yes Yes
Multi-dimensional array variables No  ? Yes (via associative arrays)  ? No No No No Yes No No No  ? Yes Yes Yes
Stream redirection Yes (arbitrary fds) Yes (arbitrary fds) Yes (arbitrary fds) Yes (arbitrary fds) Yes (arbitrary fds) Yes (arbitrary fds) Yes Yes (stdin/out/err) Yes Yes (stdin/out only) Yes (stdin/out/err) Yes (stdin/out/err) Yes Yes Yes Yes
Aliases Yes Yes Yes Yes Yes Yes Yes Yes Yes No (added via DOSKey) Yes No Yes (functions)  ? Yes (functions) Yes
Search and replace on variables Yes (via ${//} syntax)  ? Yes (via ${//} syntax and builtin commands)  ? Yes (via ${:s//} syntax)  ? Yes (via set %varname:expression syntax) Yes (via %@replace[ ] function) Yes (-replace operator) No Yes (via %@replace[ ] function) No No  ? Yes (via string methods and regular expressions) Yes (via string functions and regular expressions)
Command substitution Yes Yes Yes Yes Yes Yes Yes (via FOR /F command) Yes (via FOR /F command) Yes No Yes (via FOR /F command) No Yes  ? Yes  ?
Quoting Yes Yes Yes Yes Yes Yes Limited Yes (Backtick: `) Yes No Yes (Backtick: `)  ? Yes  ? Yes Yes
Escaping Yes (Backslash: ) Yes (Backslash: ) Yes (Backslash: ) Yes (Backslash: ) Yes (Backslash: ) Yes (Backslash: ) Yes (Caret: ^) Yes (Caret: ^) Yes (Backtick: `) No Yes (Ctrl-X: ↑) Yes Yes Yes (Backslash: ) Yes (Backslash: ) Yes (Backslash: )
Subshells Yes (Backtick: `) Yes (Backtick: `) Yes (Backtick: `) Yes (Backtick: `) Yes (Backtick: `) Yes (Backtick: `) Yes (Backtick: ` in for /f usebackq) Limited, via %@execstr[ ] and %@exec[ ] Yes No Limited, via %@execstr[ ] and %@exec[ ]  ? Yes  ? Yes Yes (Backtick: `)
Job control Yes Yes Yes Yes Yes Yes No No Yes No No No Handled by rio  ? Yes  ?
Functions Yes  ? Yes  ? Yes Yes Yes (via "call :label") Yes Yes No Yes No Yes Yes Yes Yes
Lambda functions No No No No No No No No Yes No No No No No Yes Yes
eval function Yes  ? Yes  ?  ? Yes No  ? Yes No  ? No  ?  ? Yes Yes
Pseudorandom number generation Yes  ? Yes  ? Yes  ? Yes (%random%) Yes (%@random[ ] function) Yes No Yes (%@random[ ] function) No No Yes Yes Yes
TCP/UDP connections as streams Yes  ? Yes (and SCTP support)  ? Yes No No No Yes No No No Yes Yes Yes Yes
Native CIM/WBEM support  ?  ?  ?  ?  ?  ? No No Yes No No No  ?  ?  ?  ?
Comments Yes (#) Yes (#) Yes (#) Yes (#) Yes (#) Yes (#) Yes (rem and unofficially the invalid label ::) Yes (rem and unofficially the invalid label ::) Yes (#) Yes (rem and unofficially the invalid label ::) Yes (rem and unofficially the invalid label ::) Yes (rem and unofficially the invalid label ::) Yes (#) Yes (//) Yes (#) Yes (#)
Here documents Yes  ? Yes Yes Yes Yes No Yes Yes No No No Yes  ? Yes ("""string""" syntax) Yes
Unicode Yes Yes (not on cygwin) Yes  ? Yes Yes Yes Yes Yes No No No Yes Yes Yes  ?
Startup scripts Yes Yes Yes Yes Yes Yes Yes Yes (4start) Yes Yes (via config.sys and autoexec.bat Yes (4start) No Yes  ? Yes ($PYTHONSTARTUP or ipythonrc) Yes (.irbrc)
Blocking of unsigned scripts No No No No No No No No Yes No No No No  ? No  ?
Bytecode Planned[4] No Yes (compiler is called "shcomp") No No No No No Yes No No No No Yes Yes (standard CPython, IronPython or Jython) Yes (NetRuby, JRuby)
available as statically linked, independent single file executable Yes Yes Yes  ? Yes Yes Yes No No Yes No  ? Yes Yes (bsh.jar) No No
Platform-independent Yes Yes Yes Yes Yes Yes No[5] No No No[5] No No[5] Yes Yes Yes Yes
Available as
Free Software
(as defined by the FSF)
Yes Yes Yes Yes Yes Yes No[5] No No No[5] No [6] No[5] Yes Yes Yes Yes
bash (v3.1) csh ksh (ksh93s+) pdksh zsh ash Windows
cmd.exe[1]
4NT Windows PowerShell COMMAND.COM 4DOS OS/2
cmd.exe
rc BeanShell Python shell Ruby shell
  1. ^ a b Command extensions enabled, or "cmd /x".
  2. ^ a b c Available in DR DOS via the "history" command in config.sys; see this link
  3. ^ Many shells in *nix environments change the root user's prompt to '#'.
  4. ^ Integration of bash-support is planned for Parrot.
  5. ^ a b c d e f Unofficially implemented in free DosBox, Wine, and FreeDOS.
  6. ^ Licensed under modified MIT License but it "may not be used in any commercial product without written permission from Rex Conn" so it does not qualify as free software. See See README.TXT inside http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/util/user/4dos/7.50.1/4dos7501.zip for exact licensing terms.

  Results from FactBites:
 
Vibration of Shells (2040 words)
Shells are the most efficient structures available to mankind, and they should be used more in design than they are.
For the sake of separating and defining clearly the various shell theories commonly found in the shell vibration literature, chapter 1 is devoted to their derivation, with special emphasis being given to the identification of points in the derivation where the different assumptions are made which give rise to the different theories.
Extensive comparisons of results from the various shell theories are made with those from the exact, three dimensional elasticity theory.
  More results at FactBites »


 
 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m