[Perl] brainstorming with pipes & commands
Hi all !
I have something like that :
open(FH,"command1 | command2 | command3 |");
These three commands must run together.
*command1 send on stdout a stream that command2 and command3 process
*BUT command1 send a progress in % on stderr and I MUST get it.
( I can't run command1 separately => creating a 5Go file !!! )
HOW CAN I DO THAT ????
->doing an:
open(FH,"command1 2>error.txt | command2 | command3 |");
and reading+processing error.txt ?
->CAN PERL DO SOMETHING LIKE THIS ?
## wrong code !!
1) open(PIPE);
2) open(FH,"command1 2>PIPE | command2 | command3 |");
3) while(<PIPE>) {
process the stderr
}
Well, I've been searching for 2 days but I can't find anything suitable.
Have an idea of something equivalent ?????
BIG THANX for your answers !! ;o)=
Patator da FiRsT
|