Changes

Jump to navigation Jump to search
94 bytes added ,  21:19, 22 September 2009
Line 8: Line 8:  
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:
 
<source lang="bash">WWWJAIL=/apache.jail
 
<source lang="bash">WWWJAIL=/apache.jail
export $WWWJAIL
+
export WWWJAIL
 
die() { echo "$@"; exit 2; }  
 
die() { echo "$@"; exit 2; }  
export -f die</source>
+
export -f die
 +
# now call script that will access die() and $WWWJAIL
 +
/etc/nixcraft/setupjail -d cyberciti.com</source>
 
[[Category:Catching signals]][[Category:Commands]]
 
[[Category:Catching signals]][[Category:Commands]]

Navigation menu