I can save the IP address of the current server to a variable and echo it out.
# myvar=$(/sbin/ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}')
# echo $myvar
10.11.6.117
What I want to do is to "export" it as a global variable so that I can use it in shell scripts/ other commands.