delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/04/15/13:12:25

From: guenther DOT mayerhoffer AT gmx DOT de (Guenther Mayerhoffer)
Subject: B19: reading from a pipe
15 Apr 1998 13:12:25 -0700 :
Message-ID: <35348C17.BEADF5ED.cygnus.gnu-win32@gmx.de>
Reply-To: guenther DOT mayerhoffer AT gmx DOT de
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

Hi,

I suppose there is a bug in your bash. When I enter the following
command

    echo "string" | read variable; echo $variable

there is no output. However it works under the UNIX shell scripts and
that is what I expect. It seems your bash applies the pipe statements as
own process (with own stack). The alternative command
    echo "string" | ( read variable; echo $variable )
operates very well but this would force me to change already written
UNIX shell scripts.

What can I do ?

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019