[K12OSN] ot parsing text files

Les Mikesell les at futuresource.com
Mon Apr 25 18:30:36 UTC 2005


On Mon, 2005-04-25 at 12:53, Mark Gumprecht wrote:
> Is there an easy way to parse a text file? The file is 1686 emails that
> come from a filter. It has header info that I don't care about. It says
> who overrode the filter, from where(ip address), site url,  and what the
> site is blocked for (ie porn, sex,chat). I've searched and it seems the
> only way is to do a pearl script, and that is where I'm lost. Any help
> appreciated

Perl is probably the best you'll find at text parsing.  There are
simpler languages (i.e the program does less, the programmer does more)
like awk and you can do some things in a shell script.  If all you
want is to find one or more lines that match a certain pattern you
can use grep or sed.

-- 
  Les Mikesell
   les at futuresource.com





More information about the K12OSN mailing list