Alternative name: like loop without loop or xargs.
I recently switched to zsh due to its many features. I am curious: is there a function that extends wildcards so that the command is executed once for each match, and not just once for all matches at once.
Example
The command ebook-convert input_file output_file [options]accepts only one input file. When I want to convert several files, I have to execute the command several times manually or use a loop, for example:
for i in *.epub; do
ebook-convert "$i" .mobi
done
What I need is a template that works like a loop, so that I can save a few keystrokes. Let the specified wildcard ⁂. Team
ebook-convert ⁂.epub .mobi
should expand to
ebook-convert 1stMatch.epub .mobi
ebook-convert 2ndMatch.epub .mobi
ebook-convert 3rdMatch.epub .mobi
...
, ( ). , , , , zsh .