February 2001
Beginner to intermediate
448 pages
9h 2m
English
Official Description
Variable names are marked for automatic export to the environment of subsequently executed commands.
Syntax
export [name[=value ...]]
Options
-p displays variables preceded by export.
Oddities
Similar to typeset -x.
Example
$ myvar=den # Create local variable $ $ print $myvar # Display contents den $ $ ksh # Create new shell process $ $ print $myvar # Variable myvar is local to parent shell $ $ exit # Back to parent shell $ $ print $myvar # Still available den $ $ export myvar # Make it an environment variable $ $ print $myvar # Looks the same den $ $ ksh # Create new shell $ $ print $myvar # Variable is available den $ $ exit # Exit from child shell $ $ export –p # List exported variables preceded by 'export' export ...
Read now
Unlock full access