Re: extracting data from html files


Subject: Re: extracting data from html files
From: Christopher Swingley (cswingle@iarc.uaf.edu)
Date: Thu Jun 27 2002 - 09:49:58 AKDT


Bob,

* Bob Crosby <rcrosby@alaska.net> [2002-Jun-27 08:26 AKDT]:
> What I'd like to do is step through each file searching for a particular
> string, then whenever a match is found, write the remainder of the line
> where it is found, to another file.

Sound like:

    $ grep 'string' *.html > string_match

might be the ticket. This will give you each line that contains the
string. If you really want to put only the remainder of the line in the
file you might pipe this through sed:

    $ grep 'string' *.html | sed 's/.*string\(.*\)$/\1/' > string_match

Untested. . .

-- 
Christopher S. Swingley           phone: 907-474-2689
Computer Systems Manager          email: cswingle@iarc.uaf.edu
IARC -- Frontier Program          GPG and PGP keys at my web page:
University of Alaska Fairbanks    www.frontier.iarc.uaf.edu/~cswingle

--------- To unsubscribe, send email to <aklug-request@aklug.org> with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Thu Jun 27 2002 - 09:49:43 AKDT