Bug 8894 - pipe to read command does not work in ksh/korn
pipe to read command does not work in ksh/korn
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: pdksh (Show other bugs)
6.1
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
:
: 3200 20097 42720 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-01-26 09:01 EST by Robert Easterling
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-06-18 17:50:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Robert Easterling 2000-01-26 09:01:04 EST
The read command does not receive the data from a pipe, e.g.

ksh-\1> echo "test" | read x
ksh-\2> echo $x

ksh-\3> read x
test
ksh-\4> echo $x
test
ksh-\5>

As you see in the second attempt without the pipe, read gets
the input string and assigns to variable x.  Both will work
on HP-UX and on SunOS.
Comment 1 Elliot Lee 2000-02-03 15:31:59 EST
This happens with bash too, FWIW.
Comment 2 Trond Eivind Glomsrxd 2000-04-06 18:51:59 EDT
It works with zsh - the author of pdksh is aware of the problem:
http://www.cs.mun.ca/~michael/pdksh/
Comment 3 Trond Eivind Glomsrxd 2000-08-02 09:56:07 EDT
The author is of the opinion that this is undefined behaviour in the POSIX spec.
Closing.
Comment 4 Trond Eivind Glomsrxd 2000-10-31 12:52:41 EST
*** Bug 20097 has been marked as a duplicate of this bug. ***
Comment 5 Trond Eivind Glomsrxd 2001-05-29 14:01:00 EDT
*** Bug 3200 has been marked as a duplicate of this bug. ***
Comment 6 Trond Eivind Glomsrxd 2001-05-29 14:02:03 EDT
*** Bug 42720 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.