Bash $() and (): Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= =Overview= (...) executes the command into a subshell: <syntaxhighlight lang='bash'> (ls -al) </syntaxhighlight> If the command executes as such invokes <code>e...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
=Internal=
=Internal=
* [[Bash_Concepts#.28....29|bash concepts]]


=Overview=
=Overview=
Line 10: Line 11:


If the command executes as such invokes <code>exit</code>, the calling shell does not exit.
If the command executes as such invokes <code>exit</code>, the calling shell does not exit.
$(...) is the syntax for command substitution. More details about command substitution are available here:
{{Internal|Bash_Command_Substitution|bash Command Substitution}}

Latest revision as of 02:03, 23 July 2020

Internal

Overview

(...) executes the command into a subshell:

(ls -al)

If the command executes as such invokes exit, the calling shell does not exit.

$(...) is the syntax for command substitution. More details about command substitution are available here:

bash Command Substitution