|
From: | Richardson, Anthony |
Subject: | RE: How to pass variables from octave script to Ubuntu shell |
Date: | Mon, 30 Jan 2012 13:01:47 +0000 |
You could have the Octave script write to standard output and then capture the output in your bash script. value=$(( octave --silent --eval "myfile(\"$variable\") )) Tony Richardson From: address@hidden [mailto:address@hidden
On Behalf Of Sebastian Döring Hello list, I am using a bash script to execute several other scripts including an octave script. The bash script simply calls the octave script with the following command: "octave --silent --eval "myfile(\"$variable\")". My problem is now, that I want the octave script to return a certain variable it has calculated during its execution, back to the shell, so that I can use it further and pass it again to another script (e.g. python). I have searched google a lot about this and have also found a topic from this very mailing list (about "setenv"/"getenv"), but I don really seem to get it right. I would really appreciate if someone gave me a hint on how to use these commands, or maybe how to solve my problem in another way. Thanks in advance. -Sebastian |
[Prev in Thread] | Current Thread | [Next in Thread] |