You are not logged in.

#1 2006-01-07 11:56:43

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

Bash - calling another script's variables

Can I refer to and alter one scripts variables from another, as I with functions?

Is it something like

source other_script

...and then just referring to the variable by name?

Komodo


.oO Komodo Dave Oo.

Offline

#2 2006-01-07 12:12:09

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: Bash - calling another script's variables

yes. When you source it, you get everything from that script -just as if it were copied and pasted to the one you are running currently.

Offline

#3 2006-01-07 12:35:18

Komodo
Member
From: Oxford, UK
Registered: 2005-11-03
Posts: 674

Re: Bash - calling another script's variables

Awesome, cheers Penguin  wink


.oO Komodo Dave Oo.

Offline

Board footer

Powered by FluxBB