wget command with simple url makes bash crash

2009-08-25 Thread Oskar Hermansson
Configuration Information [Automatically generated, do not change]:
Machine: i486
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i486'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
-DHAVE_CONFIG_H   -I.  -I../bash -I../bash/include -I../bash/lib   -g -O2
-Wall
uname output: Linux oshe-laptop 2.6.28-15-generic #49-Ubuntu SMP Tue Aug 18
18:40:08 UTC 2009 i686 GNU/Linux
Machine Type: i486-pc-linux-gnu

Bash Version: 3.2
Patch Level: 48
Release Status: release

Description:
bash crashes when running the following wget command for downloading a
file:
wget
http://www.kohanaphp.com/download?modules%5Bauth%5D=Auth&vendors%5Bmarkdown%5D=Markdown&languages%5Ben_US%5D=en_US&format=zip

If the command is placed in a file instead, the file is successfully
downloaded:
wget `cat url.txt`

The first wget command does not make for example "sh" crash.

My wget version (if relevant): GNU Wget 1.11.4

Repeat-By:
1. wget
http://www.kohanaphp.com/download?modules%5Bauth%5D=Auth&vendors%5Bmarkdown%5D=Markdown&languages%5Ben_US%5D=en_US&format=zip
2. bash crashes

Oskar


Re: wget command with simple url makes bash crash

2009-08-26 Thread Oskar Hermansson
On Wed, Aug 26, 2009 at 04:02, Chet Ramey  wrote:

> Oskar Hermansson wrote:
>
> > Bash Version: 3.2
> > Patch Level: 48
> > Release Status: release
> >
> > Description:
> > bash crashes when running the following wget command for downloading
> a
> > file:
> > wget
> >
> http://www.kohanaphp.com/download?modules%5Bauth%5D=Auth&vendors%5Bmarkdown%5D=Markdown&languages%5Ben_US%5D=en_US&format=zip
> >
> > If the command is placed in a file instead, the file is successfully
> > downloaded:
> > wget `cat url.txt`
> >
> > The first wget command does not make for example "sh" crash.
> >
> > My wget version (if relevant): GNU Wget 1.11.4
> >
> > Repeat-By:
> > 1. wget
> >
> http://www.kohanaphp.com/download?modules%5Bauth%5D=Auth&vendors%5Bmarkdown%5D=Markdown&languages%5Ben_US%5D=en_US&format=zip
> > 2. bash crashes
>
> How does bash crash?  Does it exit on a fatal signal, or dump core?
> You're running three commands here, since the URL is unquoted and
> contains two `&' characters.
>
> Chet
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
> ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, ITS, CWRUc...@case.edu
> http://cnswww.cns.cwru.edu/~chet/ <http://cnswww.cns.cwru.edu/%7Echet/>
>

Okay. Bash does not crash. It exits, probably just fine. It was a bit hard
to see that when running the commands in gnome-terminal, because the window
closed immediately. Just as you suggested, it was split into several
commands with the ampersand. I've broken down the case into executing the
following three commands:

o...@laptop:~$ wget http://www.google.com & unknowncommand &
variable=assignment

I don't understand why bash exits, and if this really is the defined
behavior. Maybe you can explain?

Oskar