Package: bash Version: 2.05b-26 Severity: normal
try the following commands: echo $$ bash echo $$ cat <<EOF >tmpfile /usr/games/xxxxxxx /usr/games/fortune EOF while read a b ; do echo ${a:5:-6} ; done <tmpfile echo $$ what I see: [EMAIL PROTECTED]:~$ echo $$ 6406 [EMAIL PROTECTED]:~$ bash [EMAIL PROTECTED]:~$ echo $$ 6449 [EMAIL PROTECTED]:~$ cat <<EOF >tmpfile > /usr/games/xxxxxxx > /usr/games/fortune > EOF [EMAIL PROTECTED]:~$ while read a b ; do echo ${a:5:-6} ; done <tmpfile bash: -6: substring expression < 0 [EMAIL PROTECTED]:~$ /usr/games/fortune So many men; so little time. [EMAIL PROTECTED]:~$ exit [EMAIL PROTECTED]:~$ echo $$ 6406 [EMAIL PROTECTED]:~$ it seems the failing brace expansion in the while loop leaves the redirection from <1 open after the while loop terminates. then when the contensts of the file are exhausted the shell terminates. -- System Information: Debian Release: 3.1 Architecture: i386 (i686) Kernel: Linux 2.6.13.2JB1 Locale: LANG=en_NZ, LC_CTYPE=en_NZ (charmap=ISO-8859-1) Versions of packages bash depends on: ii base-files 3.1.2 Debian base system miscellaneous f ii libc6 2.3.2.ds1-22sarge5 GNU C Library: Shared libraries an ii libncurses5 5.4-4 Shared libraries for terminal hand ii passwd 1:4.0.3-31sarge9 change and administer password and -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]