Re: Where is the syntax of ${arr...@]:1:2} described?

2010-07-08 Thread Chet Ramey
On 7/8/10 10:27 PM, Peng Yu wrote: > Hi, > > array=(a b c) > echo ${arr...@]:1:2} > > > I'm looking for the document for the above usage. I checked the Arrays > section of man bash, but I don't see a description of such usage. I > also searched man bash with [0-9]+:[0-9]+. But I still don't find

Re: Where is the syntax of ${arr...@]:1:2} described?

2010-07-08 Thread Peng Yu
I find the following. But this is for string according to the highlighted word "Substring Expansion". ${parameter:offset:length} Substring Expansion. Expands to up to length characters of The following description is actually for array. Therefore, I suggest

Where is the syntax of ${arr...@]:1:2} described?

2010-07-08 Thread Peng Yu
Hi, array=(a b c) echo ${arr...@]:1:2} I'm looking for the document for the above usage. I checked the Arrays section of man bash, but I don't see a description of such usage. I also searched man bash with [0-9]+:[0-9]+. But I still don't find a description. Could anybody let me know where this

Re: bad substitution: no closing `)' in $( #"...

2010-07-08 Thread Sven Mascheck
On Thu, Jul 08, 2010 at 10:23:00PM +0200, Thomas Hafner wrote: > Bash Version: 3.1 > Patch Level: 17 > > Description: > See this shell code: > : $( #" > ) bash-3.2 has this fixed. In case you want to exploit further, you might find http://www.in-ulm.de/~mascheck/various

bad substitution: no closing `)' in $( #"...

2010-07-08 Thread Thomas Hafner
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: freebsd6.2 Compiler: cc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='freebsd6.2' -DCONF_MACHTYPE='i386-portbld-freebsd6.2' -DCONF_VENDOR='portbld' -DLOCALEDIR='/usr/local/share/loc

Re: Malformed associative array declaration faults

2010-07-08 Thread Chet Ramey
> Machine Type: x86_64-suse-linux-gnu > > Bash Version: 4.0 > Patch Level: 35 > Release Status: release > > Description: > When executing a malformed associative array declaration, > a segmentation fault occurs: This was fixed in bash-4.1. Chet -- ``The lyf so short, the craft so lon

Malformed associative array declaration faults

2010-07-08 Thread lsteeger
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc -I/usr/src/packages/BUILD/bash-4.0 -L/usr/src/packages/BUILD/bash-4.0/../readline-6.0 Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MAC