Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jul 2002 13:21:44 -0700
From:      Luigi Rizzo <rizzo@icir.org>
To:        David Malone <dwmalone@maths.tcd.ie>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: how to find offset of a string in a binary file ?
Message-ID:  <20020713132144.A68304@iguana.icir.org>
In-Reply-To: <20020713201628.GA88506@walton.maths.tcd.ie>; from dwmalone@maths.tcd.ie on Sat, Jul 13, 2002 at 09:16:28PM %2B0100
References:  <20020713125320.A67829@iguana.icir.org> <20020713201628.GA88506@walton.maths.tcd.ie>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jul 13, 2002 at 09:16:28PM +0100, David Malone wrote:
> On Sat, Jul 13, 2002 at 12:53:21PM -0700, Luigi Rizzo wrote:
> > So, does anyone know how to use the basic unix tools to find
> > the offset of a string in a binary file ?
> > Specifically, I would like to locate the offset of the string
> > 
> > 	"MFS Filesystem goes here"
> 
> Would grep -b do what you want?

no, as i said in my email, it returns the offset of the "line",
so after it finds the string it goes back to the first newline
and returns the offset of the character after that. :(

	cheers
	luigi

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020713132144.A68304>