The committed solution is explicitly matching major/minor rather than doing a generic substring match.

My bash is a little rusty, but thanks. If the substring approach is more readable without introducing risk of a false positive, I'm all for it.