Avoid "-P" option, it is indicated as "highly  experimental". Prefer "egrep". I doubt that "-zo" are necessary after this change.

Please use the same regexp everywhere, so ```^${i}[ \t]*=```.