BMI is a bogus and misleading measure. Try percent body fat instead.
for the vast majority of people who aren't body builders it's fine and it's easier to calculate than body fat percentage.
egrep patterns are full regular expressions; it uses a fast deterministic algorithm that sometimes needs exponential space. -- unix manuals