Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: brace expansion question
- X-seq: zsh-users 8679
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: brace expansion question
- Date: Wed, 13 Apr 2005 16:05:49 +0000
- In-reply-to: <729088040504121813272d8ef2@xxxxxxxxxxxxxx>
- In-reply-to: <37104.202.128.83.123.1113366035.squirrel@xxxxxxxxxxxxxxxxx>
- In-reply-to: <20050413080315.GA57@DervishD>
- In-reply-to: <20050413111811.GA22495@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <729088040504121813272d8ef2@xxxxxxxxxxxxxx> <37104.202.128.83.123.1113366035.squirrel@xxxxxxxxxxxxxxxxx> <20050413080315.GA57@DervishD> <20050413111811.GA22495@xxxxxxxxxx>
On Apr 12, 6:13pm, grover mitchell wrote:
}
} foo1{01..10}
} bar2{01..10}
}
} Is there any way to have zsh do a brace expansion on the contents of
} this file?
On Apr 13, 2:20pm, Eric Mangold wrote:
}
} Unfortunately, I don't see a parameter expansion flag that performs
} brace expansion on the result. It seems like there ought to be one.
Paramter expansion happens before brace expansion in normal evaluation
order, so it'd be sufficient if the tilde flag made braces eligible for
interpretation as it does with glob metacharacters. The reason it does
not is mostly historical, but also for compatibility bash. (I notice
that tcsh expands braces that result from parameter expansion.)
} Perhaps the "e" flag should also do brace expansion [...] there is
} probably a good reason it doesn't.
The operations enabled by (e) all have the same evaluation order as
parameter expansion (that is, they're done left to right as the parser
encounters them).
On Apr 13, 1:18pm, Mariusz Gniazdowski wrote:
} Subject: Re: brace expansion question
}
} Day Wed, Apr 13, 2005 at 10:03:15AM +0200, DervishD:
} > cat file | while read line ; eval print $line
}
} It can be done without cat:
} { while read line ; eval print $line } < file
Or even
while read line; do eval print $line; done < file
(which doesn't require the SHORT_LOOPS setopt).
Messages sorted by:
Reverse Date,
Date,
Thread,
Author