Sometimes, you need to execute a command with a long list of files for arguments. Here's an easy way to create that list without having to type each filename yourself - put the list in a temporary file (21.3):
`...` | % |
---|
I added the vi step to remind you that you can edit this list; for example, you may want to delete a few files that you don't want to process.
Possible problems: if the list is long enough, you may end up with a command line that's too long for your shell to process. If this happens, use xargs (9.21). If your system doesn't have xargs, there are other workarounds (9.23)doesn't that should solve the problem. Article 9.24 shows another way to use temporary files for commands.
-