It seems grep is better than pgrep, as @darron said.