Changes

Jump to navigation Jump to search
67 bytes added ,  23:21, 22 September 2009
no edit summary
Line 9: Line 9:  
OR
 
OR
 
<source lang="bash">echo "Current shell: $BASH_SUBSHELL"; ( echo "Running du in subshell: $BASH_SUBSHELL" ;cd /tmp; du 2>/tmp/error 1>/tmp/output)</source>
 
<source lang="bash">echo "Current shell: $BASH_SUBSHELL"; ( echo "Running du in subshell: $BASH_SUBSHELL" ;cd /tmp; du 2>/tmp/error 1>/tmp/output)</source>
 +
* Any commands enclosed within parentheses are run in a subshell.
 
==Exporting Functions and Variables==
 
==Exporting Functions and Variables==
 
A subshell does not inherit a variable's setting. Use the [[export command]] to export variables and functions to subshell:
 
A subshell does not inherit a variable's setting. Use the [[export command]] to export variables and functions to subshell:

Navigation menu