Anonymous user
Category:UNIX Shell Implementations: Difference between revisions
Category:UNIX Shell Implementations (view source)
Revision as of 20:18, 24 October 2015
, 8 years ago→Comparison table: Use nowiki tags for a literal [[
(I chose this spot to insert a comparison table.) |
m (→Comparison table: Use nowiki tags for a literal [[) |
||
(5 intermediate revisions by one other user not shown) | |||
Line 16:
=== Comparison table ===
{| class="wikitable
! Feature
! Bourne ''sh''
! ''ash, dash''
! ''bash''
|-
Line 36 ⟶ 32:
* [http://www.mirbsd.org/htman/i386/man1/mksh.htm mksh]
| [http://man.cx/bash bash]
|-
| <tt> `''command''`</tt>
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
| <tt>''func''() { ''list''; }</tt>
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
| <tt>[ -n "$''param''" ]</tt>
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
| <tt>''PARAM''=''value''<br />export ''PARAM''</tt>
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
| <tt>export ''PARAM''=''value''</tt>
| {{no}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
| <tt>local ''param''</tt>
| {{no}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
| <tt>${''param''##*/}<br />${''param''%/*}</tt>
| {{no}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
| <tt>ls ~</tt>
| {{no}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
| <tt>$(''command'')</tt>
| {{no}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
| <tt>$(( ''i = 2 + 3'' ))</tt>
| {{no}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
| <tt>(( ''i = 2 + 3'' ))</tt>
| {{no}}
| {{no}}
| {{yes}}
| {{yes}}
|-
| <tt><nowiki>[[</nowiki> -n $''param'' ]]</tt>
| {{no}}
| {{no}}
| {{yes}}
| {{yes}}
|-
| <tt>function ''name'' { ''list''; }</tt>
| {{no}}
| {{no}}
| {{yes}}
| {{yes}}
|-
| <tt>${''array''[''2'']}</tt>
| {{no}}
| {{no}}
| {{yes}}
| {{yes}}
|-
| <tt>set -A ''array 11 22 33''</tt>
| {{no}}
| {{no}}
| {{yes}}
| {{no}}
|-
| <tt>''array''=(''11 22 33'')</tt>
| {{no}}
| {{no}}
| {{optional|mksh}}
| {{yes}}
|-
| <tt>$' \t\n'</tt>
| {{no}}
| {{no}}
| {{optional|mksh}}
| {{yes}}
|}
=== Portability notes ===
Line 80 ⟶ 176:
==Comparison of various shells==
[http://
|