[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

read doesn't work with piped stdin

From: Blaine Simpson
Subject: read doesn't work with piped stdin
Date: Sun, 18 Nov 2007 13:51:08 -0500

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc -I/usr/src/packages/BUILD/bash-3.2 
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-suse-linux-gnu' 
-DCONF_VENDOR='suse' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -O2 -fmessage-length=0 -Wall 
-D_FORTIFY_SOURCE=2 -fstack-protector -g -D_GNU_SOURCE -DRECYCLES_PIDS -Wall 
-pipe -g -fPIE -fprofile-use
uname output: Linux beyla #1 SMP 2007/11/06 23:05:18 UTC 
x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-suse-linux-gnu

Bash Version: 3.2
Patch Level: 25
Release Status: release

        read silently fails when stdin is piped to it.  -u switch does not help.
    Redirection works fine.

    echo 'one line' > /tmp/1line
    cat /tmp/1line | read
    does not set $REPLY, but
    read < /tmp/1line

reply via email to

[Prev in Thread] Current Thread [Next in Thread]