Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

capture STDOUT from CALL SYSTEM

rreis
Nuevo Colaborador I
1.030 Vistas
Hi

Is it possible, using only fortran, to capture stdout from a call system() invocation?

best,
0 kudos
1 Solución
Ron_Green
Moderador
1.030 Vistas
Quoting - rreis
whithout capturing it to a file and reading it later, off course...

Yes, that would be useful and I've needed this capability. Unfortunately I know of no way to do this from just Fortran - other than the redirection of output to a file which is then opened and read.

Ver la solución en mensaje original publicado

3 Respuestas
rreis
Nuevo Colaborador I
1.030 Vistas
whithout capturing it to a file and reading it later, off course...
Ron_Green
Moderador
1.031 Vistas
Quoting - rreis
whithout capturing it to a file and reading it later, off course...

Yes, that would be useful and I've needed this capability. Unfortunately I know of no way to do this from just Fortran - other than the redirection of output to a file which is then opened and read.
roddur
Principiante
1.030 Vistas

Yes, that would be useful and I've needed this capability. Unfortunately I know of no way to do this from just Fortran - other than the redirection of output to a file which is then opened and read.
Ah! Would rreis post it a day earlier, and ronald replied, it would have save me few days!!i was stuck with same problem with
call system ('uname -snm>>file.log') to run only to see this happns to stdout but not in other file.
i had to have a short encounter with c to do this....thanks to both of you.
Responder