#! /bin/bash # This script tests: pnmquantall # Also requires: ppmtorgb3 pgmhist PATH=/src/netpbm/pbin/:/usr/bin ppmtorgb3 testimg.ppm pnmquantall 20 testimg.red testimg.grn testimg.blu for i in testimg.red testimg.grn testimg.blu do cksum $i done # Should print 1 pnmcat testimg.red testimg.grn testimg.blu -tb | \ pgmhist -m | awk '$2>0 {s++}; END { print s<=20 }'