What is a Subshell?

From Linux Shell Scripting Tutorial - A Beginner's handbook
Revision as of 20:55, 22 September 2009 by Admin (talk | contribs)
Jump to navigation Jump to search

Exporting Functions and Variables

A subshell does not inherit a variable's setting. Use the export command to export variables and functions to subshell:

export $WWWJAIL
die() { echo "$@"; exit 2; } 
export -f die