Redian新闻
>
Help -- How to output error messages to a file for scripts called by system calls???
avatar
Help -- How to output error messages to a file for scripts called by system calls???# Programming - 葵花宝典
y*n
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
avatar
e*r
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

avatar
y*n
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

avatar
t*t
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

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。