Bash Scripting help with F90 Command-line arguments

Hi, I have a quick question about a problem that I just have had no luck in finding the answer to.

I am trying to run an F90 executable inside a Bash Script, using 2 command-line arguments for the executable file using the "getarg()" F90 function. The 2 inputs arguments are string path names and for an Input filename and an Output filename. Here is the basic line of code:

Code:
./program.exe /filepath/Input_file.dat /filepath/Output_file.dat

If I copy this line exactly as it is and run it at the command line, there are no problems whatsoever. But, with this line put into the Bash script, I always get the error:

Code:
./This_Bash_Script.scr: line 52: ./program.exe: No such file or directory

Any ideas?
Thanks so much for the help... I really appreciate it!
 
jredog3 said:
-------------------------------------------------------------
./program.exe /filepath/Input_file.dat /filepath/Output_file.dat
-------------------------------------------------------------

If I copy this line exactly as it is and run it at the command line, there are no problems whatsoever. But, with this line put into the Bash script, I always get the error:

"./This_Bash_Script.scr: line 52: ./program.exe: No such file or directory"

Any ideas?
Don't use bash for such a simple thing, the POSH (Plain Old SHell) /bin/sh will do just fine.

The ./program.exe tells the script to run program.exe from the current (./) directory. You normally don't run commands from the current directory. Use the full path to program.exe and the script will run fine.
 
Back
Top