Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ranges
- X-seq: zsh-users 8935
- From: Christian Taylor <cht@xxxxxxxxx>
- To: "zsh-users" <zsh-users@xxxxxxxxxx>
- Subject: Re: ranges
- Date: Wed, 1 Jun 2005 18:28:32 +0200
- In-reply-to: <milr91541g9uethehdcrs2ru7qir9iumpb@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <milr91541g9uethehdcrs2ru7qir9iumpb@xxxxxxx>
All right, let's hope I don't write too much nonsense...
> ls fred{09..13}.pl
> ls fred<76-99>.pl
> ls fred<76->.pl
>
> Are these really different?
"ls fred{09..13}.pl" = "ls fred09.pl fred10.pl fred11.pl fred12.pl fred13.pl"
This is just expanded by the shell, no matter which of those files actually
exist.
"ls fred<76-99>.pl" = "ls <all matching files>"
The shell inserts only existing files which match the specified criterium.
"ls fred<76->.pl" is like the above, but would match any number greater than
75, for instance fred28742.pl
> ls *.(jpg|gif) # list graphic files
> ls fred{joe,sid}.pl
>
> Are these really different?
"ls *.(jpg|gif)" = "ls <all matching files>"
"ls fred{joe,sid}.pl" = "ls fredjoe.pl fredsid.pl"
Hope this helps,
Christian Taylor
Messages sorted by:
Reverse Date,
Date,
Thread,
Author