read command fortran command line supply data

typically if you have a fortran program which asks for a input and reads it using read command, one way of giving the input in the command line is by using the echo command

say the executable is a.out

and a number is read by the program

$echo “5” | ./a.out

5 is send to the a.out, and is read by the program while running

courtesy: http://stackoverflow.com/questions/13843772/fortran-read-command-line-arguments-how-to-use-command-line-argument

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s