-   Linux - General (
-   -   read in parameter and make it as keyboard output (

chi99 04-18-2011 02: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.


ButterflyMelissa 04-18-2011 02:57 PM

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


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

Hope this helped;


chi99 04-18-2011 11:28 PM

Hi Thor,

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

ButterflyMelissa 04-19-2011 09:49 AM

You're welcome! :)

All times are GMT -5. The time now is 04:46 AM.