LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   read in parameter and make it as keyboard output (http://www.linuxquestions.org/questions/linux-general-1/read-in-parameter-and-make-it-as-keyboard-output-875698/)

chi99 04-18-2011 03:22 PM

read in parameter and make it as keyboard output
 
Hello all,

I am trying to write a script (especially C-shell) to execute a fortran code that reads in parameters from keyboard typing. I will have to process this .F code for many times with the parameters the same for all my data files, therefore, I don't have to type in everytime I execute the .F code.
But I don't know what is the command in c shell to read in a text files that contains all the parameters I want and can make the shell read in appropriately to feed the .F code. I will be really appreciate if people here can help me deal with the problem I am facing now.

thanks,
TC

Thor_2.0 04-18-2011 03:57 PM

Hmm, how about this... (maybe, dont kill me, please?)

Quote:

yourProgram.f < file_with_command
where file_with_command is a plain text file with the required commands...

Hope this helped;

Thor

chi99 04-19-2011 12:28 AM

Hi Thor,

Thanks for your reply. It is really great information!
It worked! thank you.

Thor_2.0 04-19-2011 10:49 AM

You're welcome! :)


All times are GMT -5. The time now is 10:08 PM.