Avoid multi-line grep on Solaris 10