[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: iGlobal variable not updated in while loop when reading from pipe
From: |
Chet Ramey |
Subject: |
Re: iGlobal variable not updated in while loop when reading from pipe |
Date: |
Tue, 02 Dec 2003 09:34:40 -0500 |
> Configuration Information [Automatically generated, do not change]:
> Machine: i386
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu'
> -DCONF_VENDOR='redhat' -DSHELL -DHAVE_CONFIG_H -D_GNU_SOURCE
> -D_FILE_OFFSET_BITS=64 -I. -I. -I./include -I./lib -I/usr/include -O2
> -march=i386 -mcpu=i686
> uname output: Linux admin.bgremote.com 2.4.2-2smp #1 SMP Sun Apr 8 20:21:34
> EDT 2001 i686 unknown
> Machine Type: i386-redhat-linux-gnu
>
> Bash Version: 2.04
> Patch Level: 21
> Release Status: release
>
> Description:
> The variables free, use, and siz are supposed to accumulate the
> variables read in from the pipeline. However, once the while loop is done,
> their value outside of the loop is still 0. The script works as expected in
> the Korn shell.
Read the Bash FAQ, question E4.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Live...Laugh...Love
Chet Ramey, ITS, CWRU chet@po.cwru.edu http://tiswww.tis.cwru.edu/~chet/