I wrote a python script that calls two files to perform some calculations and asks for a name for the new file to place the calculation in so my code runs like this:
python code.py in_file1 in_file2 outfile
Now, I have several files that need the same calculation and their names only change by the last numbers, so I wanted to do a script that takes the different needed files in a folder performs the python script and name the outputs changing only the las number according to the given in_file1 (infield_2 actually does not change).
I tried something simple but is not working
#!/bin/bash
python code.py in_file[19]* infile_2 outfile[19]*
I get an error from the usage of python saying that usage: python code.py [-h] in in2 out unrecognized arguments
I know for sure that code.py works, I just wanted to spare to do it one file at a time. Thank you. I am really new in python and linux, appreciate any help you can give.
code.pyoutput something? Is it absolutely necessary to write the script in BASH? It can be written in Python too