Hi Guys,
I have a a bash script and i am exporting a variable in it.
I am calling a csh script from this bash script.
The variable "ABC" will be visible in csh script.
ks.bash
export ABC = abc
./kp.csh
ab.csh
echo $ABC
setenv ABC =cde (i want to assign this value to ABC only if its not defined in bash)
kp.csh
source ab.csh
I want to change the value of "ABC" in csh script if its not defined in bash script.
change your ab.csh with below and execute your ks.bash
if (! $?ABC ) setenv ABC cde
The problem is, i have 20 such variables like "ABC". So it will not be a good way to go ahead.
Anything like "ifdef" which can be used instead.
what is your full code ? where are they (20 vals) ?
Its a huge script which has these variables, which can be set from the command line to get the desired functionality.
The problem is, my top script is bash. If i define these in csh then If i want to write new values to these variable from my top Bash script i cant do that.