On Thu, Jun 9, 2011 at 13:48, Lawrence Crowl <cr...@google.com> wrote:
> > line=$(sed -e "/^spawn .*$pattern/ ! d ; s/^spawn //" $logf) > > Has one fewer process and one fewer pipe. Sed is your friend. sed and I have a complicated relationship. But, sure :) > I think this code fails when multiple lines match the pattern. > Pipe through head? Yup. It does. I'm sure there will be other things, it's in contrib/ now. I'll wait until we've used it and expanded it a bit more and move it to trunk. Diego.