The output could be further processed using sed/awk/whatever. But this is sufficient for a quick view of all pi revisions. Thanks again for sharing this!

By the way, using your script (revision 3) I get line 4: warning: command substitution: ignored null byte in input. This is due to the fact that /sys/firmware/devicetree/base/model ends with a hex 0 value. Didn't know that before...