I'm so new to shell scripts. I'd really appreciate if anyone can help please.
I have a Fortran code, consisting of a program and three subroutines that correct a certain line of a file (with .pol extension) using a .txt file, by the following commands in Linux Ubuntu terminal:
gfortran -c FirstSubroutine.f90
gfortran -c SecondSubroutine.f90
gfortran -c ThirdSubroutine.f90
gfortran FirstSubroutine.o FirstSubroutine.o FirstSubroutine.o MainProgram.f90 -o exeFileName
./exeFileName Path1 .polFileToBeModified Path2
In which Path1 is the folder where all input files (including .pol and .txt files) are and Path2 is the folder in which all output files are desired to be saved.
The question is: "How can I write a shell script that does this process for many input files?"
-Wall -g -Otogfortran. Read about Invoking GCC