Replace gnu-specific sed command with simple grep.