Hello,
I'm trying to write a bash script that will generate some code to be used in a scripting language (NEURON). I'm hoping to define my variables in the bash script, and then "transfer" these variables to my newly generated code.
For example, say I wanted to insert the variable IClamp_amp into my code, I have written the following bash script to do such a thing:
Code:
function wp()
{
echo $1 = $$1 > nrn_parameters.hoc
echo $1 = $$1
}
export IClamp_amp=0.1
wp IClamp_amp
Based on this code, I would expect the line IClamp_amp = 0.1 to appear in nrn_parameters.hoc; however, I instead see the following:
IClamp_amp = 217891
(Note that I was able to get this working by replacing $$1 with $[$1]. However, this produces an error when IClamp_amp is a non-integer, and I need IClamp_amp to be a decimal number)
Thanks for looking!
