# Can one combine Mathematica with bash script?

For example, I create a Mathematica nb file which can work on a set of parameter values or several files at once. It needs me to change the parameter after finishing computing one parameter.

If I have a set of such pairs of parameters, manually entering them is a lot of work. Could it be done in an automatic way?

The more details of my purpose is followed. In case, I am trying to find some change points in the time series, such as spike in the nerves cell, current shift from open to close of ion channel. So it is normal to load a file of original time series and output is the change points file.

So it is not simple just change one parameter.It is that can nb file automatically work to several data files one by one? No human is need to change file name loaded.

• Have you tried looping through your parameters? And saving the results to disk after each one is finished? – rm -rf Dec 24 '15 at 16:37
• Yes, sounds quite feasible. But you need to supply more information, optimally code to show what you want to do and what you tried already. Otherwise this question will be too broad. – Yves Klett Dec 24 '15 at 18:51
• In case, I am trying to find some change points in the time series, such as spike in the nerves cell, current shift from open to close of ion channel. So it is normal to load a file of original time series and output is the change points file. – TerryWasato Dec 25 '15 at 7:31
• Just a vague recommendation: pack your code into dedicated functions/modules (perhaps even a package) and use Map or Table or similar from within Mathematica to iterate over your data sets. There are several threads about batch processing around... e.g. mathematica.stackexchange.com/q/66858/131 or mathematica.stackexchange.com/q/5242/131 – Yves Klett Dec 25 '15 at 19:04