This program is part of Netpbm.
pnmcat was obsoleted by pamcat, introduced with Netpbm 11.00 (September 2022). pamcat is almost backward compatible with pnmcat, plus adds many additional functions, including the ability to process PAM images.
These are the ways in which pamcat is not backward compatible with pnmcat:
pamcat, on the other hand, work on generic PAM images and does not really recognize colors. It sees a PBM input as a 1-plane image and a PPM input as a 3-plane image and produces a 3-plane output image. By default, in the example above, the foo part of the output contains the black and white sample values in its first plane, but zeroes in its second and third planes, which means if you take the output image to be a PPM-like color visual image, the foo part is black and red instead of black and white.
But this is easy to fix. Use the -extendplane option to say instead of making those additional planes zero, make them copies of the first plane. So the three panes in the foo part of the output image will all contain the same sample values as the single plane of the PBM input, which means if you use the output image as a color image, those pixels are black and white.
For full backward compatibility, pnmcat remains in Netpbm, implemented as a simple wrapper of pamcat. For the fewest problems with future releases of Netpbm, you should not use pnmcat in any new work.
In Netpbm before 11.00, use the manual for pamcat with pnmcat, observing the following differences: