Introduction to Linux:
Prev
Appendix C. Shell Features
Next
C.2. Differing features
The table below shows major differences between the standard shell (sh ), Bourne Again SHell (bash ), Korn shell (ksh ) and the C shell (csh ).
Shell compatibility
Since the Bourne Again SHell is a superset of sh , all sh commands will also work in bash - but not vice versa. bash has many more features of its own, and, as the table below demonstrates, many features incorporated from other shells.
Since the Turbo C shell is a superset of csh , all csh commands will work in tcsh , but not the other way round.
Table C-2. Differing Shell Features
sh
bash
ksh
csh
Meaning/Action
$
$
$
%
Default user prompt
>|
>|
>!
Force redirection
> file
2>&1
&> file
or > file
2>&1
> file
2>&1
>& file
Redirect stdout and stderr to file
{ }
{ }
Expand elements in list
'command'
'command'
or $(command)
$(command)
'command'
Substitute output of enclosed command
$HOME
$HOME
$HOME
$home
Home directory
~
~
~
Home directory symbol
~+
, ~-
, dirs
~+
, ~-
=-
, =N
Access directory stack
* License

