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

Discussion in 'Perl Misc' started by Dib Urim, Dec 2, 2003.

  1. Dib Urim

    Dib Urim Guest

    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
    Dib Urim, Dec 2, 2003
    #1
    1. Advertising

  2. 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

    "Dib Urim" <> wrote in message news:bqhjf6$iif$...
    > 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 |");
    Ben Liddicott, Dec 2, 2003
    #2
    1. Advertising

  3. <OT>

    On Tue, 2 Dec 2003 10:42:22 +0200, "Dib Urim" <>
    wrote:

    >print ("$_");


    print ($_);
    print $_;
    print;

    </OT>


    Michele
    --
    # This prints: Just another Perl hacker,
    seek DATA,15,0 and print q... <DATA>;
    __END__
    Michele Dondi, Dec 3, 2003
    #3
  4. Michele Dondi <> wrote:
    ><OT>

    ^^^^
    ^^^^

    > print ($_);
    > print $_;
    > print;


    ></OT>

    ^^^^^
    ^^^^^


    That sure looks like Perl to me...


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Dec 3, 2003
    #4
  5. On Wed, 3 Dec 2003 07:46:04 -0600, (Tad
    McClellan) wrote:

    >><OT>

    > ^^^^
    > ^^^^
    >
    >> print ($_);
    >> print $_;
    >> print;

    >
    >That sure looks like Perl to me...


    OT wrt the subject line!


    Michele
    --
    # This prints: Just another Perl hacker,
    seek DATA,15,0 and print q... <DATA>;
    __END__
    Michele Dondi, Dec 3, 2003
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    5,655
    Jonathan Bromley
    Feb 18, 2005
  2. Replies:
    4
    Views:
    1,694
    Terry Hancock
    Apr 23, 2005
  3. Ernesto
    Replies:
    1
    Views:
    759
    Ernesto
    Feb 1, 2006
  4. Peter A. Schott
    Replies:
    4
    Views:
    585
    Peter A. Schott
    Feb 7, 2006
  5. Dib Urim
    Replies:
    4
    Views:
    176
    Ben Liddicott
    Nov 23, 2003
Loading...

Share This Page