On Sun, 14 Aug 2005, Herb Martin wrote:

> The following test script hangs under CygWin Bash and run
> to completion under Windows (CMD.exe) -- both command lines
> run fine when run from the respective shell prompts (not
> in Perl), even when redirected to a file or piped to another
> command (more, grep, etc.):
>
> #!/usr/bin/perl -w
> open(NETSHARE, "net share |") or die "Can't run net share: $!\n";
> print "we got through the call to 'net share'\n";
> while (<NETSHARE>) {
>   print;
> }
>
> open(IPSEC, "netsh ipsec static show all format=table |") or die "Can't run
> netsh: $!\n";
> print "we got through the call to 'netsh'\n";
> while (<NETSHARE>) {
          ^^^^^^^^
Is there a particular reason you open one filehandle, but read from
another?
        Igor

>   print;
> }
> #################end test script ##################
>
> Is this Perl, Bash, CygWin, or something that I have
> done wrong in the script?

-- 
                                http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_                [EMAIL PROTECTED]
ZZZzz /,`.-'`'    -.  ;-;;,_            [EMAIL PROTECTED]
     |,4-  ) )-,_. ,\ (  `'-'           Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL     a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to