Capture external command output line by line on Windows 98, shell problem.

D

Dib Urim

Hello,

I'm trying to Capture external command output and error line by line.
There is no problem to implement it on windows 2000, but in Windows 98
you need a special shell.
The only shell that I found and it really work with is: stderr.exe*

This code is work fine on w98:

open(PROC,"stderr.exe $some_command |");
while(<PROC>) {
print ("$_");
}
close(PROC);

But the point is that it fail when I'm specify full path for "stderr.exe"
(becuase I'm exe file using perlapp and --bind don't help)

For example:

open(PROC,"C:/dir_name/stderr.exe $some_command |");
while(<PROC>) {
print ("$_");
}
close(PROC);

My questions are:
1) Why can't I specify full path ?
2) Do you know any alternative shell that work on Windows 98 using pipe.

Regards
 
B

Ben Liddicott

Hi Dib,

You need to put the full path in quotes, if it contains any spaces, which it often will on Win32.

open(PROC,qq[stderr.exe "$some_command" |]);

Cheers,
Ben Liddicott
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top