# Bash Scripting help with F90 Command-line arguments



## jredog3 (Feb 23, 2010)

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:


```
./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?
Thanks so much for the help... I really appreciate it!


----------



## SirDice (Feb 23, 2010)

jredog3 said:
			
		

> -------------------------------------------------------------
> ./program.exe /filepath/Input_file.dat /filepath/Output_file.dat
> -------------------------------------------------------------
> 
> ...


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.


----------



## jredog3 (Feb 24, 2010)

Ahhhhh...  Of course!
That did the trick.

Thank you so much!

Have a good one.


----------

