Hi,
I have a question. I know that if I want to access any variables defined in a calling script (script1.ksh) in a called script (script2.ksh) I need to export that variable in the calling script to make it available in the called script. But what about the functions in the calling script?
script1.ksh
export var1=InScript1
function todayDate
{
echo $(date)
}
script2.ksh
echo $var1
If I call the script1.ksh in script2.ksh then I can access all the functions & variables (without exporting) of script1.ksh like below:
script2.ksh
. /home/dips/script1.ksh
todayDate
If suppose I don't want to include the whole of the script1.ksh but want to access only parts of it as in few variables and a function then is it possible?
-dips