Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: brace expansion question



    Hi Eric and Grover :)

 * Eric Mangold <teratorn@xxxxxxxxxxxxx> dixit:
> > foo1{01..10}
> > bar2{01..10}
> >
> > Is there any way to have zsh do a brace expansion on the contents of this
> > file?
> This is kind of a lame way to do it. Hopefully someone has something
> better :)
> 
> for word in `cat file`; eval echo $word

    I don't find it lame, but since the file can be quite large, that
expansion could result in a very long command line. Maybe this is
better (untested!!!):

    cat file | while read line ; eval print $line

> Unfortunately, I don't see a parameter expansion flag that performs brace
> expansion on the result. It seems like there ought to be one.

    I don't remember right now :(

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.dervishd.net & http://www.pleyades.net/
It's my PC and I'll cry if I want to...



Messages sorted by: Reverse Date, Date, Thread, Author