Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Expansion of patterns
- X-seq: zsh-users 8571
- From: J <jean.chalard@xxxxxxxxx>
- To: Hugo Haas <hugo@xxxxxxxxx>
- Subject: Re: Expansion of patterns
- Date: Wed, 9 Mar 2005 13:43:13 +0100
- Cc: zsh-users@xxxxxxxxxx
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=TwY3GEnFSqTx6EOhfTz3Ww5L+qM5t2zEFRExKZUmISPtDGzNgU8FfxP9MoAGG5citGcdwrVhnBr7g8E0fiz1TZxomp4xkH+qooB5gokovWZmvOASR5ZePJh18RNmhAV6NYztVP/xSM8BLx/N6dteGosCNEGmC9exHgpVKMMkeJg=
- In-reply-to: <87d5u958l3.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <87d5u958l3.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: J <jean.chalard@xxxxxxxxx>
> I've been wanting to expand patterns that do not match filenames. For
> example:
>
> echo a1 a2 a3
>
> could be (hopefully) written:
>
> echo a[1-3]
> [...]
> Is there any way to expand patterns like this in a simple way?
For this one you can just write a{1..3} which should work the way you
expect. Note that it does keep leading zeroes, so that a{01..03} will
produce
a01 a02 a03.
--
J
"- Watashi, DATE-tte hajimete datta no...
- Sou kai ?
- Hontou wa suki na hito to surun deshou ?" -- Tokugawa Asuka
Messages sorted by:
Reverse Date,
Date,
Thread,
Author