Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
SImple way to execute command on list of files?
- X-seq: zsh-users 23932
- From: Dominik Vogt <dominik.vogt@xxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: SImple way to execute command on list of files?
- Date: Sun, 14 Apr 2019 09:46:32 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1555231595; bh=HZWKGMwhXHNa1DcmVa8oeaoRHDih+U8TVl1ayz6vQWw=; h=X-UI-Sender-Class:Date:From:To:Subject:Reply-To; b=E/UimKWGMK14S8TCrIMAIto7a8fKfMduKFrTw++5PwrUTYb85koZG+0MiSNENkdEY hlIXBFuiGcEzhGhdIB9henMSvXeJCdCNUrVypcPdpVEckUQkAXNGkmSpAGXocXCRU3 nbuNegB/DUG7pwp3TNYQZwAqmVpwRGsGOk5uUG/M=
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mail-followup-to: Zsh Users <zsh-users@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Reply-to: dominik.vogt@xxxxxx
Other than writing an alias or a function, is there a simple way
to call commands that take only one file argument multiple times?
In other words
$ xpdf *.pdf
$ ps2pdf a.ps b.ps c.ps
should be executed (semantically) as
$ for F in *.pdf; do xpdf "$F"; done
$ ps2pdf a.ps; ps2pdf b.ps; ps2pdf c.ps
I'm looking for a kind of extension for the command syntax. Of
course I could write a function with that syntax for each command,
but is there a more general way where you can define a list of
commands to treat differently, say
annoying_commands xpdf ps2pdf gv
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
Messages sorted by:
Reverse Date,
Date,
Thread,
Author