poolm <gopt><topt> [ -p pool ]* ( -apply | -app ) <cmd> [ -expr <expr> ]
This option may be used to apply any command you want to packages selected by the given expression. The command is specified directly after the option -apply or -app and read as one token. If it contains any white-space, you will most likely have to quote it, using double or single quotes depending on your shell. The command must not contain any of the variables mentionend in Section 4.4, as no variable substitution will take place. The command is executed in the pool/package/version_dir, so that you may use relative pathnames to specify files and directories.
The option -shell can be used to specify an alternate command interpreter that is called to execute the command. This can be very useful if you need more sophisticated globbing or substitution mechanisms than the simple integrated shell can offer.
The option -k instructs poolm to ignore the result codes returned by the executed commands. Normally, poolm will stop if any command returns a value other than 0 (shell equivalent for true). This option allows you to keep going in case of errors.
The option -q will suppress the echoing of the command to be executed and generally make poolm a bit more quiet.
Here is a somewhat contrived example that lists the sizes of all package description files of all not-outdated package versions in the local pool:
poolm -expr 'not outdated' -apply 'wc PkgDesc'
If you also want the sizes of all C source and header files, you could use the following command:
poolm -expr 'not outdated' -k -q -apply \ 'wc PkgDesc src/*.c inc/*.h 2>/dev/null' -shell /bin/sh
The expressions used to select the pools are the same as in the -list command and described in detail in Section 4.2.