By default, arguments are taken one at a time, and the command is executed with each argument in turn. The command is interpreted by the default shell, which may vary depending on the platform and the setting of the SHELL environment variable.
% is a magic character in the command string. If command contains a character sequence of the form %i, where i is an non-negative integer, the magic character sequence will be replaced by the i'th argument of the arguments remaining to be processed. This also indicates that each command will process at least i arguments, rather than processing and discarding them singly.
This option may be overridden by giving magic sequences in the command string, as described above.
SHELL Pathname of shell to use. If this variable is not defined, the Bourne shell (sh) is used.
For instance, if the environment variable SHELL is set to a_nonexistent_shell, apply simply exits without a warning or error code. Surely we can do better without breaking anything.
Hasn't been tested on non-Unix platforms.
This program is free and open software. You may use, modify, distribute, and sell this program (and any modified variants) in any way you wish, provided you do not restrict others from doing the same.