Re: Memory leak when using ${!pre...@} in a loop

2009-08-26 Thread Chet Ramey
mu...@muszi.kite.hu wrote: > 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' -DLO

Re: manpage note? weird strings that appear to be equal but create haywire comparisons?

2009-08-26 Thread Chet Ramey
Linda Walsh wrote: > But then I tested equality on the strings and that's the confusing > part. I have an idea of what's going on but boy do string compares look > confused. They perform same on cygwin > (bashv=3.2.49(22)-release (i686-pc-cygwin)) and Suse11.1: > (bashv=3.2.39(1)-release (x86_64-

Memory leak when using ${!pre...@} in a loop

2009-08-26 Thread muszi
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='ba

Re: manpage note? weird strings that appear to be equal but create haywire comparisons?

2009-08-26 Thread Linda Walsh
Greg Wooledge wrote: On Wed, Aug 26, 2009 at 02:45:39AM -0700, Linda Walsh wrote: I had a var 'c' set to (no quotes in the var): 'C\windows\system32' How did you assign this value? Did you read it from a file? Did you type a specific bash command? -- I typed it in at the prompt as:

Re: how to keep newlines in ``

2009-08-26 Thread Greg Wooledge
On Wed, Aug 26, 2009 at 03:04:16PM -0400, Sam Steingold wrote: > foo=`ls` > echo $foo echo "$foo"

Re: how to keep newlines in ``

2009-08-26 Thread pk
Sam Steingold wrote: > this: > foo=`ls` > echo $foo > will print files in one line even though ls prints them with newlines. > is there a way to preserve newlines in the above echo? > thanks. echo "$foo"

how to keep newlines in ``

2009-08-26 Thread Sam Steingold
this: foo=`ls` echo $foo will print files in one line even though ls prints them with newlines. is there a way to preserve newlines in the above echo? thanks.

Re: manpage note? weird strings that appear to be equal but create haywire comparisons?

2009-08-26 Thread Pierre Gaston
On Wed, Aug 26, 2009 at 4:19 PM, Greg Wooledge wrote: > Assuming the first part was supposed to be var='"*"' ... > yup > > The bash command [[ \* = $var ]] returns true if $var contains a glob > pattern against which a literal asterisk * can be matched. (By the way, > you don't need the \ there

Re: manpage note? weird strings that appear to be equal but create haywire comparisons?

2009-08-26 Thread Greg Wooledge
On Wed, Aug 26, 2009 at 04:36:42PM +0300, Pierre Gaston wrote: > Thanks, I agree with that, I'm sorry I should have been more explicit, > what was not clear to me was where this special role of the \ is explained, > Because if you use literals [[ something = \* ]] is the same as [[ > something = "

Re: manpage note? weird strings that appear to be equal but create haywire comparisons?

2009-08-26 Thread Greg Wooledge
On Wed, Aug 26, 2009 at 02:45:39AM -0700, Linda Walsh wrote: > I was scripting and fixing some permissions in Win, > and had a var 'c' set to (no quotes in the var): 'C\windows\system32' How did you assign this value? Did you read it from a file? Did you type a specific bash command? > # ech

Re: wget command with simple url makes bash crash

2009-08-26 Thread Chet Ramey
> 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 t

Re: wget command with simple url makes bash crash

2009-08-26 Thread Greg Wooledge
On Tue, Aug 25, 2009 at 02:40:24PM +0200, Oskar Hermansson wrote: > 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: >

Re: manpage note? weird strings that appear to be equal but create haywire comparisons?

2009-08-26 Thread Pierre Gaston
On Wed, Aug 26, 2009 at 12:45 PM, Linda Walsh wrote: > I was scripting and fixing some permissions in Win, > and had a var 'c' set to (no quotes in the var):   'C\windows\system32' > I first bumped into this using the printf -v var "%q" feature, where > I expected it to doublequote the back slash

manpage note? weird strings that appear to be equal but create haywire comparisons?

2009-08-26 Thread Linda Walsh
I was scripting and fixing some permissions in Win, and had a var 'c' set to (no quotes in the var): 'C\windows\system32' # echo $v |hexdump -C 43 3a 5c 77 69 6e 64 6f 77 73 5c 73 79 73 74 65 |C:\windows\syste| 0010 6d 33 32 0a |m32.|

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.kohanaph