interpretation of pound (#) character inside a bracket expression inside single quotes inside backticks
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc -m32 Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linu x-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/path /to/bash-3.2/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I/pa th/to/src/bash-3.2_linux/bash-3.2 -I/path/to/src/bash-3.2_linux/bash-3.2/include -I/path/to/src/bash-3.2_linux/bash-3.2/lib -I/path/to/include -g -O2 uname output: Linux glnx011 2.4.21-37.ELhugemem #1 SMP Wed Sep 7 13:22:27 EDT 20 05 i686 i686 i386 GNU/Linux Machine Type: i686-pc-linux-gnu Bash Version: 3.2 Patch Level: 0 Release Status: release Description: The pound character (#), when located inside a bracket expression inside single quotes inside backticks, is incorrectly interpreted as the bash comment token. Repeat-By: (simplified version of code from current texLive distribution) TABSIZE=`grep -v '^[ #]' some_file` ./test1: line 3: unexpected EOF while looking for matching ``' ./test1: line 6: syntax error: unexpected end of file (original line, as found in libs/ncurses/include/MKhashsize.sh of texLiv e) TABSIZE=`grep -v '^[ #]' $CAPS | grep -v "^$" | grep -v "^capalias"| gre p -v "^infoalias" | wc -l` -- pooryorick
Re: interpretation of pound (#) character inside a bracket expression inside single quotes inside backticks
Poor Yorick wrote: > > Description: > The pound character (#), when located inside a bracket expression > inside > single quotes inside backticks, is incorrectly interpreted as the bash > comment token. Patch 1 to bash-3.2 fixed this. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Live Strong. No day but today. Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://cnswww.cns.cwru.edu/~chet/
"exit" doesn't work from inside of PIPED read block
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc -I/usr/src/packages/BUILD/bash-3.2 -L/usr/src/packages/BUILD/bash-3.2/../readline-5.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 2.6.22.12-0.1-default #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 Description: "exit" doesn't exit the current shell when inside of PIPED read blocks, yet everything works find if the input comes from "redirection". Repeat-By: cat /tmp/atf | while read; do exit 3; done # for any text file /tmp/atf Yet the following works cat /tmp/atf | while read; do exit 3; done
read doesn't work with piped stdin
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc -I/usr/src/packages/BUILD/bash-3.2 -L/usr/src/packages/BUILD/bash-3.2/../readline-5.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 2.6.22.12-0.1-default #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 Description: read silently fails when stdin is piped to it. -u switch does not help. Redirection works fine. Repeat-By: echo 'one line' > /tmp/1line cat /tmp/1line | read does not set $REPLY, but read < /tmp/1line does.