mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Weinehall <tao@acc.umu.se>
To: Karim Yaghmour <karim@opersys.com>
Cc: Ingo Oeser <ioe-lkml@rameria.de>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Average instruction length in x86-built kernel?
Date: Mon, 1 Aug 2005 09:35:58 +0200	[thread overview]
Message-ID: <20050801073558.GI9841@khan.acc.umu.se> (raw)
In-Reply-To: <42EBDBA5.5090008@opersys.com>

On Sat, Jul 30, 2005 at 03:57:25PM -0400, Karim Yaghmour wrote:
[snip]
> # Remove non-instruction lines:
> sed /^[^c].*/d $2-dissassembled-kernel > $2-stage-1
> 
> # Remove empty lines:
> sed /^'\t'*$/d $2-stage-1 > $2-stage-2
> 
> # Remove function names:
> sed /^c[0-9,a-f]*' '\<.*\>:$/d $2-stage-2 > $2-stage-3
> 
> # Remove addresses:
> sed s/^c[0-9,a-f]*:'\t'// $2-stage-3 > $2-stage-4
> 
> # Remove instruction text:
> sed s/'\t'.*// $2-stage-4 > $2-stage-5
> 
> # Remove trailing whitespace:
> sed s/'\s'*$// $2-stage-5 > $2-stage-6

Uhm, you do know that sed allows you to execute several commands after
eachother, right?

sed -e 's/foo/bar/;s/baz/omph/'

That way you should be able to save a few stages.
Also, your script is, as far as I could see, a clean sh-script;
no need for /bin/bash; use /bin/sh instead.


Regards: David Weinehall
-- 
 /) David Weinehall <tao@acc.umu.se> /) Northern lights wander      (\
//  Maintainer of the v2.0 kernel   //  Dance across the winter sky //
\)  http://www.acc.umu.se/~tao/    (/   Full colour fire           (/

  reply	other threads:[~2005-08-01  7:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-29 21:32 Karim Yaghmour
2005-07-30 13:49 ` Ingo Oeser
2005-07-30 19:57   ` Karim Yaghmour
2005-08-01  7:35     ` David Weinehall [this message]
     [not found] <4vKU4-3sU-21@gated-at.bofh.it>
     [not found] ` <4w02Q-7e6-21@gated-at.bofh.it>
     [not found]   ` <4w5OQ-6Z9-25@gated-at.bofh.it>
2005-07-31  2:19     ` Bodo Eggert
2005-08-01  6:25       ` Jan Engelhardt

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=20050801073558.GI9841@khan.acc.umu.se \
    --to=tao@acc.umu.se \
    --cc=ioe-lkml@rameria.de \
    --cc=karim@opersys.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

Powered by JetHome