added newline chars to grep commands