linux - Passing one shell script variable to another shell script -


i trying access 1 script variable script example,

script1.sh:

export a=10 export b=20 echo "testing" exit 

script2.sh:

. script1.sh echo $a 

the problem involved here able access variable 'a' script1 in script2 executing all commands written in script1.sh annoying. want access exported variables in script1 , donot want run commands in script1 while calling in script2.

kindly help!

thanks,
karthik

assigning variable command. unless you're prepared write bash parser in bash, want cannot done.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -