5 ms·
Bash can do that easily, the syntax is just a bit different $ echo {1..3}.pdf {a..d}.pdf 1.pdf 2.pdf 3.pdf a.pdf b.pdf c.pdf d.pdf
by jvehent 14y ago
Bash can do that easily, the syntax is just a bit different
$ echo {1..3}.pdf {a..d}.pdf
1.pdf 2.pdf 3.pdf a.pdf b.pdf c.pdf d.pdf
- dima55 14y agoThe parent was wrong, and bash can't do the thing he MEANT. The above aren't globs, they just generates strings. None of those files need to exist. In zsh you can use <7-10>.txt to match 7.txt, 8.txt, 9.txt and 10.txt. Zero-padding is loose. 07.txt and 08.txt match also, for instance. The bash {..} syntax just doesn't handle this variable 0-padding case, which is extremely common when looking at a directory full of photos, for instance.