>       I have a programme did in fortran that works like that:
> 
> #>my_programme.exe < input

Fortran source should be able to read from stdin like other programs
but there are going to be some differences. Using a "here" document
goes something like:

#! /bin/sh
# do something
something <<!EOF

bla
bla
bla
!EOF

The idea is to have the input "here" in the same script as the program,
and not somewhere else in an external file. The shell basically makes
stdin to be in your document, reads the lines one at a time until it
hits the "EOF" and then continues on.

Note that it not need to be EOF - that is just a label to tell the
shell when the data stops. Of course, both the EOFs should match, or
you end up reading off the end of the disk :(.
> 
> But this does not work! only works if I give enter after <<EOF, then
> my_arguments [Enter] and at last EOF.

My guess is there has to be a line feed somewhere, otherwise the
shell doesn't see the last EOF.



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to