Generated or received a file descriptor number that is not va lid 
Author Message
 Generated or received a file descriptor number that is not va lid

You might try:
my $CmdStr2 = "my.pl 2>&1 > file2";

Quote:
> Subject:   Re: Generated or received a file descriptor number that is
> not valid

> Mahesh Asolkar wrote ..
> >I have a couple of small perl scripts...

> >One is exec.pl ...

> >#!/usr/local/bin/perl -w

> >my $CmdStr1 = "my.pl > lst1";
> >my $CmdStr2 = "my.pl >& lst2";

        ----snip----------

> >I think the problem lies in the '&' in $CmdStr2. If that is removed,
> >all's well - except the functionality - because I want all the STDERR
> >& STDOUT messages to go into the lst files. Is there any way I can get
> >response on v5.6.0 similar to the 5.005_03?
        ----snip----------




Tue, 28 Jan 2003 03:00:00 GMT  
 Generated or received a file descriptor number that is not va lid

Quote:

>> Mahesh Asolkar wrote ..
>> >my $CmdStr2 = "my.pl >& lst2";

The >& notation is a csh-ism that bash happens to support.  Thus
it works on Linux (where the typical installation has bash
installed as the default shell), but not on HP/UX (which, IIRC,
has a ksh derivative installed as the default shell).

Quote:
>You might try:
>my $CmdStr2 = "my.pl 2>&1 > file2";

That will not work as desired!  The >'s are processed
left-to-right, so you will want:
 my $CmdStr2 = "my.pl > file2 2>&1";

(Yes, this is getting quite off-topic for c.l.p.m, but since the
above incorrect shell answer got through I feel it is appropriate
to post this correction.  I recommend that those who want to
have further discussion about shell redirection syntax to do
so over on comp.unix.shell.)

                --Ken Pizzini



Wed, 29 Jan 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Adding a row with a TDBGrid?

2. Help : How to manage fields with 'Illegal Name' ?

3. Generated or received a file descriptor number that is not valid

4. Generated or received a file descriptor number that is not valid

5. sh: lst2: Generated or received a file descriptor number that is not valid

6. **URGENT** Finding the number of open file descriptors using perl

7. how to open file descriptor by number?

8. Problem with UPPER() sql and BDE.

9. Help with Printer Output

10. variable number of socket descriptors

11. Getting errors after a finite number of Oracle records are received

 

 
Powered by phpBB® Forum Software