no "read" from pipe, using ksh on Mac OS 10.4.3

no "read" from pipe, using ksh on Mac OS 10.4.3

Post by dan.rickh.. » Fri, 18 Nov 2005 04:38:46



On my PowerMac G5, in a "Terminal" window configured to launch with the
ksh '93 shell that comes with Mac OS 10.4.3, I find that ksh's built in
"read" does not read from a pipe.  For example, neither of the
following produces output:

$ print "Hello World." | { read; print "$REPLY"; }

$ print "Hello World.\nHow's things?" | while read; do print "$REPLY";
done

I very seriously doubt that the problem is that the "read" is in a
subshell below the shell of the "print".

The above commands **do** produce the expected output on my Windows PC,
using the ksh '93 that that's part of UWIN.

My Mac is a PowerMac G5, running OS X 10.4.3, with all recent updates:

$ uname -a
Darwin Dans-Computer.local 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct
3 20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC Power
Macintosh powerpc

The ksh version that came with Mac OS 10.4.3:

$ print ${.sh.version}
Version M 1993-12-28 p

I downloaded the latest "q" build from the AT&T site, but I got the
same results.

Any suggestions?

Thanks,
Dan R.

 
 
 

1. ksh - no "read" from pipe, but not common "subshell" issue

I apologize for resubmitting this, but I fear that many of you skipped
over it, assuming that it was the same "ksh - no "read" from pipe"
issue that has been previously discussed ad nauseam by this forum.  I
don't think this problem is caused by the "read" executing in a
subshell..

On my PowerMac G5, in a "Terminal" window configured to launch with the
ksh '93 shell that comes with Mac OS 10.4.3, I find that ksh's built in
"read" does not read from a pipe.  For example, neither of the
following produces output:

$ print "Hello World." | { read; print "$REPLY"; }

$ print "Hello World.\nHow's things?" | while read; do print "$REPLY";
done

I very seriously doubt that the problem is that the "read" is in a
subshell below the shell of the "print".

The above commands **do** produce the expected output on my Windows PC,
using the ksh '93 that that's part of UWIN.

My Mac is a PowerMac G5, running OS X 10.4.3, with all recent updates:

$ uname -a
Darwin Dans-Computer.local 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct
3 20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC Power
Macintosh powerpc

The ksh version that came with Mac OS 10.4.3:

$ print ${.sh.version}
Version M 1993-12-28 p

I downloaded the latest "q" build from the AT&T site, but I got the
same results.

Any suggestions?

Thanks,
Dan R.

2. using multiple arguments to cgi scripts

3. Using "if" in "ksh" to change "for loop" values....

4. Help with video timing please (Have data, don't know what it mea~s

5. Problem reading from pipe ("|") using read()

6. AppleShare, anyone?

7. Problem reading from pipe ("|") using read() -- Solved

8. How to best utilize twin SCSI adapters

9. Bug in ksh 88[df] "print -u2" and/or "read" statement.

10. Strange effect in "read" with "ping" (ksh)

11. Bug in ksh 88[df] "print -u2" and/or "read" statement?

12. GETSERVBYNAME()????????????????????"""""""""""""

13. "Novell-like","non-TCP/IP","networking" OS to place Unix