Exporting Environment Variables
<<<< ^^^^^ >>>>

shoname.sh
#!/bin/bash
echo shoname says myname=$myname.

test.sh
#!/bin/bash
myname="Steve Litt"; echo -n myname="$myname, "; ./shoname.sh
export myname; echo -n myname="$myname, "; ./shoname.sh
unset myname; echo -n myname="$myname, "; ./shoname.sh
export myname="Richard Stallman"; echo -n myname="$myname, "; ./shoname.sh
let mynumber=4; let mynumber=$mynumber+1; echo mynumber=$mynumber
unset mynumber; echo mynumber=$mynumber

<<<< ^^^^^ >>>>

 
 
 
 
Copyright (C) 2005 by Steve Litt, you can freely distribute unmodified copies if this copyright notice and disclaimer are intact.  This material originally appeared on Troubleshooters.Com.

This presentation has no warranty, express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the presentation is with you. Neither the author nor those who show the slideshow are responsible for any damage caused by errors, omissions, or anything else relating to this slideshow.
 

9.html

Exit Slideshow