Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • main.py is a complicated program but it runs totally fine when executed directly with the terminal and with the same arguments. Commented Jun 12, 2016 at 7:06
  • 1
    What errors are you getting when put inside the shell script? Is the shell script and the python script are on the same directory? Commented Jun 12, 2016 at 7:08
  • Yes, the shell script and the python script are in same directory. The error looks like this: ` Traceback (most recent call last): File "main.py", line 2, in <module> from cell import Cell File "/home/hasnain/Data/Studies/Courses/Current_Courses/Seminar/Code/Experiments/Without_LTS1/cell.py", line 9 def __init__(self, width:float, h:float=0.0, hu:float=0.0, hv:float=0.0, flux_r=array((0.0, 0.0, 0.0)), flux_l=array((0.0, 0.0, 0.0)), dt_cfl=0.0, kmax=0.0, k = 0.0): ^ SyntaxError: invalid syntax` Commented Jun 12, 2016 at 7:14
  • 1
    Can you post the content of script.sh in full? Commented Jun 12, 2016 at 7:20
  • I have tried it both ways, with nested loops and with hardwired argumenrs In nested loops, it is like: ` arr_t=("1.0") arr_dt=("0.00158") arr_np=("10") for t in "${arr_t[@]}" do for dt in "${arr_dt[@]}" do for np in "${arr_np[@]}" do python main2.py $t $dt $np echo $t echo $dt echo $np done done done` Without loops it was: python main.py 1.0 0.1 10 It does not work either way. Commented Jun 12, 2016 at 7:33