pamexec

Execute a shell command on each image in a Netpbm file. See also: pamfile, pampick, pamsplit. More information: https://netpbm.sourceforge.net/doc/pamexec.html.

pamexec command path/to/image.pam

pamexec command path/to/image.pam -check