List expansion in a 'for in' control structure

2005-07-30 Thread Till Halbach
Configuration Information: Machine: i386 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu' -DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H -I. -I../bash -I../bash/include -I../bash/lib -g -O2

read -t loses data

2005-07-30 Thread bcboy
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-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale'

Re: List expansion in a 'for in' control structure

2005-07-30 Thread Bob Proulx
Till Halbach wrote: Bash Version: 2.05b The bash manual for the control structure 'for name [ in word ] ; do list ; done' says: 'The list of words following in is expanded, generating a list of items.' However, if no files are found, it is set equal to the query string. Yes. That

Re: List expansion in a 'for in' control structure

2005-07-30 Thread Chet Ramey
Till Halbach wrote: The bash manual for the control structure 'for name [ in word ] ; do list ; done' says: 'The list of words following in is expanded, generating a list of items.' However, if no files are found, it is set equal to the query string. If you want filename expansion

Re: read -t loses data

2005-07-30 Thread Bob Proulx
[EMAIL PROTECTED] wrote: If read -t times out without fulfilling a request, any pending data is lost. Via strace it's apparent that the problem is that when the user requests a line of data, bash read is actually calling read() with a buffer size of one. So bash is holding the data.