From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22649 invoked by alias); 9 Jun 2011 21:27:50 -0000 Received: (qmail 22641 invoked by uid 22791); 9 Jun 2011 21:27:49 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Jun 2011 21:27:35 +0000 Received: from kpbe13.cbf.corp.google.com (kpbe13.cbf.corp.google.com [172.25.105.77]) by smtp-out.google.com with ESMTP id p59LRYjv024325 for ; Thu, 9 Jun 2011 14:27:34 -0700 Received: from gxk7 (gxk7.prod.google.com [10.202.11.7]) by kpbe13.cbf.corp.google.com with ESMTP id p59LQ7QP003978 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 9 Jun 2011 14:27:33 -0700 Received: by gxk7 with SMTP id 7so1547564gxk.35 for ; Thu, 09 Jun 2011 14:27:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.230.12 with SMTP id c12mr2441074ybh.13.1307654853069; Thu, 09 Jun 2011 14:27:33 -0700 (PDT) Received: by 10.151.142.15 with HTTP; Thu, 9 Jun 2011 14:27:33 -0700 (PDT) In-Reply-To: References: <20110609174910.F3F741DA1CD@topo.tor.corp.google.com> Date: Thu, 09 Jun 2011 22:08:00 -0000 Message-ID: Subject: Re: [pph] New script to reproduce failures from a .log file (issue4601050) From: Diego Novillo To: Lawrence Crowl Cc: reply@codereview.appspotmail.com, Gabriel Charette , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00772.txt.bz2 On Thu, Jun 9, 2011 at 13:48, Lawrence Crowl wrote: > > line=3D$(sed -e "/^spawn .*$pattern/ ! d ; s/^spawn //" $logf) > > Has one fewer process and one fewer pipe. =C2=A0Sed 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.