On Oct 27, 2004, at 5:11 AM, Kuestner, Bjoern wrote: > You could maybe pipe it through sed first and remove all the line > breaks, > then keep the pipe going to grep and to the usual magic. > > Björn Does anyone know how to capture newlines with sed? I'm thinking: cat file.txt | sed "s/\n/ /g" | grep blah... (But this doesn't work: \n isn't matching newlines.)