3 ms·
another nice one which i get a lot of use out've.. (again, no idea if bash can do this too) $ setopt brace_ccl #put this in your ~/.zshrc $ echo {1-3}.p
by q_revert 14y ago
another nice one which i get a lot of use out've.. (again, no idea if bash can do this too)
$ setopt brace_ccl #put this in your ~/.zshrc
$ echo {1-3}.pdf {a-d}.pdf
1.pdf 2.pdf 3.pdf a.pdf b.pdf c.pdf d.pdf
- jvehent 14y agoBash 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.