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

Re: ranges



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