y******n 发帖数: 3 | 1 This might be a very simple question for most of the people here.I am using
Perl.I have to use system calls to run another fortran script. I am running
this fortran script on thousands of different input files. For some files,
the script doesn't work and output an error message. I need to get these
error messages. But I don't know how to do this. Please help!!!!
If I run this fortran script independently, the error message will be
through the standard output. But using the system calls, I don't | e******r 发帖数: 220 | 2 how about change standard out from "stdout" to "FILE". Here "FILE" is
some file handler? Like,
select FILE;
print "....";
Then the print result would be in that file.
using
running
where
【在 y******n 的大作中提到】 : This might be a very simple question for most of the people here.I am using : Perl.I have to use system calls to run another fortran script. I am running : this fortran script on thousands of different input files. For some files, : the script doesn't work and output an error message. I need to get these : error messages. But I don't know how to do this. Please help!!!! : If I run this fortran script independently, the error message will be : through the standard output. But using the system calls, I don't
| y******n 发帖数: 3 | 3 Thanks a lot!
But this is not my problem. It is a error message generate by a fortran
excutable. I don't have the source code (even if I do, I don't know fortran)
. It is automatically printed to the stardard out. I am just wondering
whether I can somehow re-pipe it to some file.
is
【在 e******r 的大作中提到】 : how about change standard out from "stdout" to "FILE". Here "FILE" is : some file handler? Like, : select FILE; : print "...."; : Then the print result would be in that file. : : : using : running : where
| t****t 发帖数: 6806 | 4 $result=`your_fortran_program`;
note it's backtick, not single quote.
using
running
where
【在 y******n 的大作中提到】 : This might be a very simple question for most of the people here.I am using : Perl.I have to use system calls to run another fortran script. I am running : this fortran script on thousands of different input files. For some files, : the script doesn't work and output an error message. I need to get these : error messages. But I don't know how to do this. Please help!!!! : If I run this fortran script independently, the error message will be : through the standard output. But using the system calls, I don't
|
|