Having thought more about it, I realize what you mean and why we were
misundersanding each other.  I was thinking about array concatenation,
and you about string concatenation.  I am suggesting the default
operaion to be array concatenation rather than array cross-product as
it is now.

On 5/11/06, Philip Ganchev <[EMAIL PROTECTED]> wrote:
On 5/11/06, Axel Liljencrantz <[EMAIL PROTECTED]> wrote:
> On 5/11/06, Philip Ganchev <[EMAIL PROTECTED]> wrote:
> > On 5/10/06, Axel Liljencrantz <[EMAIL PROTECTED]> wrote:
> [...]  How would you rewrite some
> of my above examples without multiplicate command substitution?

[reordered]
> # Loop over all users
> for i in (cat /etc/passwd); ...; end

Where is the multiplication here?  The loop iterates over lines in
file "/etc/passwd".  This should work as currently.

The "cat /etc/passwd" would produce a list as before.  There is no
multiplication or concatenation, except the trivial multiplication
(with nothing) and the trivial concatenation.

> # Remove a sequence of files
> rm img(seq 4 39).jpg

If brace expansion uses whitespace separators,

    rm img{(seq 4 39)}.jpg

The "seq 4 39" produces a list.  The {} multiplies this list to the
lists containing one element each, "img" and ".jpg".  The result is a
list whose first element is "img4.jpg", etc.

> # Print information about select files
> ll (find . -type ...)

Where is the multiplication here?  The command substitution outputs a
list of filenames and "ll" uses it as input.  This would work as
currently.

Again, no multiplication or concatenation except the trivial ones.

This is an alternative to the expansion mechanism proposed by Beni
(see my reply to his post).

String concatenation can be achieved as "$arr2".


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to