Your message dated Fri, 5 Apr 2024 22:24:13 +0200
with message-id <[email protected]>
and subject line Re: bash: redirection outlasts loop with failing brace
expansion
has caused the Debian Bug report #420257,
regarding bash: redirection outlasts loop with failing brace expansion
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
420257: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=420257
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
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:
jasen@gonzo:~$ echo $$
6406
jasen@gonzo:~$ bash
jasen@gonzo:~$ echo $$
6449
jasen@gonzo:~$ cat <<EOF >tmpfile
> /usr/games/xxxxxxx
> /usr/games/fortune
> EOF
jasen@gonzo:~$ while read a b ; do echo ${a:5:-6} ; done <tmpfile
bash: -6: substring expression < 0
jasen@gonzo:~$ /usr/games/fortune
So many men; so little time.
jasen@gonzo:~$ exit
jasen@gonzo:~$ echo $$
6406
jasen@gonzo:~$
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
--- End Message ---
--- Begin Message ---
Version: 5.0-6
On Sat, 21 Apr 2007 20:16:02 +1200 Jasen Betts <[email protected]> wrote:
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 $$
Hi,
this issue does not seem to affect version 5.0-6 and later of bash.
$ echo $$
2956729
$ bash
$ echo $$
2956866
$ cat <<EOF >tmpfile
> /usr/games/xxxxxxx
> /usr/games/fortune
> EOF
$ while read a b ; do echo ${a:5:-6} ; done <tmpfile
games/x
games/f
$ echo $$
2956866
Please reopen this bug if you can still reproduce this issue.
Regards,
--
Gioele Barabucci
--- End Message ---