Bash as input to Fortran
Hi guys,
I have an Fortran 90 program which has two values it needs to read in from the shell. If there was only one read, then I have found that the following script is possible in bash to automate running this f90 code many times... input=10 echo $input | ./f90program However, if I have two variables to feed into the f90program, I have found that trying... echo "$input1 $input2" | ./f90program ...does not work, can anyone suggest a way to solve this minor problem? Thanks, Natski |
Perhaps don't quote the input variables?
Or maybe your fortran code wants the two variables on seperate lines? In which case echo -e "$input1\n$input2" | ./f90program will work |
That's perfect, thanks a lot Cantab!
|
All times are GMT -5. The time now is 10:08 AM. |