Updated first post in this thread to
gmpaint-1.2.
Replaced "cut" subprocess calls with shell string processing (actually "set" command-line parsing used to parse output lines from hexdump).
Replaced wrapper filter function with parentheses around entire subprocess loop, and added subprocess exit status check.
It is "more better smaller faster simpler", and that is a "good thing" in my book!
I hope you learn something from this -- I know *I* did!
Enjoy!
P.S. I left the original gmpaint-1.0.gz file in the dowload links in the first post above, in case you want to compare the original and latest versions of the script, to see what I was talking about above.