Re: [flalug] File content extraction question

From: Chad Perrin (perrin@apotheon.com)
Date: Sun Nov 11 2007 - 16:06:59 EST


On Fri, Nov 09, 2007 at 07:00:08PM -0700, Chad Perrin wrote:
> On Fri, Nov 09, 2007 at 07:12:19PM -0500, tom smith wrote:
> > I have a binary file with readable email addresses embedded in it.
> > I would like to extract those email addresses to a text file such that the email
> > addresses are readable and separated, preferably all in one column.
> > Is there anyway to do this with a shell script or using a series of file system
> > utilities? Each email address is an identifiable string e.g. soandso@blabla.com
>
> It should be doable with a regular expression -- either cat, grep, and
> redirects, or something like Perl or Ruby.

. . . or, as someone else pointed out, you could use the `strings`
utility. I completely forgot about that one.

-- 
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
John Kenneth Galbraith: "If all else fails, immortality can always be
assured through spectacular error."



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:03:09 EDT