public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@redhat.com>
To: Lawrence Crowl <crowl@google.com>
Cc: Diego Novillo <dnovillo@google.com>,
	reply@codereview.appspotmail.com,        gchare@google.com,
	gcc-patches@gcc.gnu.org
Subject: Re: [pph] New script to reproduce failures from a .log file (issue4601050)
Date: Fri, 10 Jun 2011 06:36:00 -0000	[thread overview]
Message-ID: <orlixa9tw9.fsf@livre.localdomain> (raw)
In-Reply-To: <BANLkTi=X648H==7pQSSYTVfTvnx3R9kA5w@mail.gmail.com> (Lawrence	Crowl's message of "Thu, 9 Jun 2011 13:48:43 -0700")

On Jun  9, 2011, Lawrence Crowl <crowl@google.com> wrote:

> On 6/9/11, Diego Novillo <dnovillo@google.com> wrote:
>> +args="$@"

I'd keep args in "$@" and use "$@" instead of $args, so as to avoid
quoting issues.

>> +line=$(grep "^spawn .*$pattern" $logf | sed -e "s:^spawn ::")

> line=$(sed -e "/^spawn .*$pattern/ ! d ; s/^spawn //" $logf)

> Has one fewer process and one fewer pipe.  Sed is your friend.

I'd have written sed -n "s/^spawn \(.*$pattern\)/\1/p", but I'm not sure
it's more efficient.

It would be wise to first quote slashes in the pattern:

pattern=`echo "$pattern" | sed 's:/:\\/:g'`

>> +if [ "$line" = "" ] ; then

[ -z "$line" ]

Thanks, Diego,

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer

      parent reply	other threads:[~2011-06-10  4:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-09 18:40 Diego Novillo
2011-06-09 21:27 ` Lawrence Crowl
2011-06-09 22:08   ` Diego Novillo
2011-06-10  6:36   ` Alexandre Oliva [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=orlixa9tw9.fsf@livre.localdomain \
    --to=aoliva@redhat.com \
    --cc=crowl@google.com \
    --cc=dnovillo@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gchare@google.com \
    --cc=reply@codereview.appspotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).