> > > That means you can do things like
> > >
> > > [{0,1,2,3}]=foo
> > >
> > > to set the first four elements to the same value
This does work, but only in this context. It's a hard sell to say that
it should work when using compound assignments and not any other time.
I'm inclined to either
On Friday, August 24, 2012 09:38:44 AM you wrote:
> On 8/22/12 8:58 PM, Chet Ramey wrote:
>
> > Then how about this: words inside a compound assignment statement that are
> > recognized as assignment statements ([1]=foo) are expanded like assignment
> > statements (no brace expansion, globbing, or
On 8/22/12 8:58 PM, Chet Ramey wrote:
> Then how about this: words inside a compound assignment statement that are
> recognized as assignment statements ([1]=foo) are expanded like assignment
> statements (no brace expansion, globbing, or word splitting). Other words
> undergo all the expansions.
On 8/20/12 5:12 PM, Dan Douglas wrote:
> On Monday, August 20, 2012 07:44:51 PM Roman Rakus wrote:
>> And how would you achieve to fill array with all file names containing
>> `[1]=' for example.
>
> $ ls
> [1]=a [1]=b
> $ ( typeset -a a=( \[1\]=* ); typeset -p a )
> typeset -a a=('[1]=a' '[1]=b
On Tuesday, August 21, 2012 07:24:31 AM Stephane Chazelas wrote:
> 2012-08-20 19:44:51 +0200, Roman Rakus:
> [...]
> > And how would you achieve to fill array with all file names
> > containing `[1]=' for example.
> [...]
>
> Another interesting question is how to fill the array with all
> the fil
2012-08-20 19:44:51 +0200, Roman Rakus:
[...]
> And how would you achieve to fill array with all file names
> containing `[1]=' for example.
[...]
Another interesting question is how to fill the array with all
the file names that start with a digit followed by "=".
$ touch {3..5}=foo
$ ls
3=foo
On Monday, August 20, 2012 07:44:51 PM Roman Rakus wrote:
> And how would you achieve to fill array with all file names containing
> `[1]=' for example.
$ ls
[1]=a [1]=b
$ ( typeset -a a=( \[1\]=* ); typeset -p a )
typeset -a a=('[1]=a' '[1]=b')
$ ( typeset -a a=( [1]=* ); typeset -p a )
typeset
On 08/20/2012 07:12 PM, Gundi Cress wrote:
Am Sat, 18 Aug 2012 19:55:17 +0100 schrieb Stephane Chazelas:
2012-08-18 10:26:22 -0500, Dan Douglas:
This is a feature that all shells with this style of compound
assignment have in common. If no explicit subscripts are given, the
text between the pa
Am Sat, 18 Aug 2012 19:55:17 +0100 schrieb Stephane Chazelas:
> 2012-08-18 10:26:22 -0500, Dan Douglas:
>> This is a feature that all shells with this style of compound
>> assignment have in common. If no explicit subscripts are given, the
>> text between the parentheses is processed exactly as th
Bleh I'm wrong, brace expansion remains too. I should know this... it's hard to
remember all the quirks even when I write them down.
On Saturday, August 18, 2012 07:55:17 PM Stephane Chazelas wrote:
> 2012-08-18 10:26:22 -0500, Dan Douglas:
> > This is a feature that all shells with this style of compound assignment
> > have
> > in common. If no explicit subscripts are given, the text between the
> > parentheses is processed
2012-08-18 10:26:22 -0500, Dan Douglas:
> This is a feature that all shells with this style of compound assignment have
> in common. If no explicit subscripts are given, the text between the
> parentheses is processed exactly as though it were arguments to a command
> including brace expansion,
This is a feature that all shells with this style of compound assignment have
in common. If no explicit subscripts are given, the text between the
parentheses is processed exactly as though it were arguments to a command
including brace expansion, word-splitting, and pathname expansion (and
con
This is a question about bash's behaviour concerning assignment to array
members.
Bash Version 4.2.24(1)-release (x86_64-pc-linux-gnu)
The bash manual (version 4.1, chapter 3.4) says about assignment
to shell variables: "Filename expansion is not performed."
simple test to proof this on the co
14 matches
Mail list logo