On Wednesday, September 1, 2021 at 4:53:09 PM UTC-7, David Duffy wrote:
(snip)
> Most generally, you will have to then capture the output of the command to a file, and
> read that back in. You can using C interop to directly access such
> commands, but this is going to be system specific.o
> Cheers, David Duffy.
Well if you are doing that, might as well call popen().
(But yes, it will still be system specific.)
Though it would be better to have a real Fortran equivalent to popen().
In the Fortran 77 days, with HP-UX, I did manage to use popen().
HP-UX Fortran (at least used to) have a way to connect a Unix file
descriptor to a Fortran unit. I had a program do the popen() and then
return the fd, for the Fortran program to use. That was so I could
spool directly to lpr.