grep the right database