Command line arguments?
Posted: Thu May 26, 2005 11:45 pm
On 11/30/2004 Jose Ambros-Ingerson <jose@kiubo.net> wrote:
It would be very convenient to be able to
run nrniv from a shell script and be able to execute a function call.
A line in this script would look something like:
$ nrniv funcdef.hoc -e "foo(p1,p2)"
which would mean "load file funcdef.hoc and then execute "foo(p1,p2)" where foo
was defined in funcdef.hoc and p1, p2 are parameters to this function.
Is there something like this available in Neuron?
I know that I could write:
$ cp funcdef.hoc tmp.hoc
$ echo "foo(p1,p2)" >> tmp.hoc
$ nrniv tmp.hoc
but I would prefer to avoid dealing with temporary files (they get tricky when
there are several instances of the script running in parallel).
It would be very convenient to be able to
run nrniv from a shell script and be able to execute a function call.
A line in this script would look something like:
$ nrniv funcdef.hoc -e "foo(p1,p2)"
which would mean "load file funcdef.hoc and then execute "foo(p1,p2)" where foo
was defined in funcdef.hoc and p1, p2 are parameters to this function.
Is there something like this available in Neuron?
I know that I could write:
$ cp funcdef.hoc tmp.hoc
$ echo "foo(p1,p2)" >> tmp.hoc
$ nrniv tmp.hoc
but I would prefer to avoid dealing with temporary files (they get tricky when
there are several instances of the script running in parallel).