I'm sure this fixes portability, but I'm curious where it broke and if you're sure this doesn't require `egrep`?