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

Re: Expansion of patterns



> 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