Bug 8894 - pipe to read command does not work in ksh/korn
Summary: pipe to read command does not work in ksh/korn
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: pdksh (Show other bugs)
(Show other bugs)
Version: 6.1
Hardware: i386 Linux
low
medium
Target Milestone: ---
Assignee: Trond Eivind Glomsrxd
QA Contact:
URL:
Whiteboard:
Keywords:
: 3200 20097 42720 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-01-26 14:01 UTC by Robert Easterling
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Robert Easterling 2000-01-26 14:01:04 UTC
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 20:31:59 UTC
This happens with bash too, FWIW.

Comment 2 Trond Eivind Glomsrxd 2000-04-06 22:51:59 UTC
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 13:56:07 UTC
The author is of the opinion that this is undefined behaviour in the POSIX spec.
Closing.

Comment 4 Trond Eivind Glomsrxd 2000-10-31 17:52:41 UTC
*** Bug 20097 has been marked as a duplicate of this bug. ***

Comment 5 Trond Eivind Glomsrxd 2001-05-29 18:01:00 UTC
*** Bug 3200 has been marked as a duplicate of this bug. ***

Comment 6 Trond Eivind Glomsrxd 2001-05-29 18:02:03 UTC
*** 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.