On Mon, 7 Jan 2002, Mayuresh Kathe wrote:

> #!/bin/bash
> export TYPE=M
> export IPADDRESS=192.168.0.13
> export NETMASK=255.255.255.0
> export GATEWAY=192.168.0.1
> export DNS=192.168.0.2
> 
> On executing it, the variables are not loaded up in memory.
> Anybody has any ideas as to why that must be happening?

export will export variables to the environment of all subshells, not 
parent shells.  You cannot set the environment of the parent.  If you 
think about it for a short while, you'll realise why.

You'll also notice that if you do a cd from within a script, the change 
does not reflect when you exit the script.

-- 
It would seem that evil retreats when forcibly confronted.
                -- Yarnek of Excalbia, "The Savage Curtain", stardate 5906.5


_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to