![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Apr 2005
Posts: 1
Rep Power: 0
![]() |
validate USENET posts
I have a file with a lot of USENET posts.
I need a tool wich can validate the posts in this file and write a list of the valid posts. the posts begins with: From f.nurk@aol.com Fri Mar 11 10:28:59 2005 From: "Fred Nurk" <f.nurk@aol.com> Newsgroups: comp.os.linux.misc References: <427df_1@news.tm.net.my> <38r7qF5sn4U7@individual.net> Subject: Re: Find Linux OS Brand and Version Date:Fri, 4 Mar 200517:38:35 +0100 MIME-Version: 1.0 ++ some more header fields the tool need to check that the message begins with these headers fields , and if they do list them to std output. any tips on how to begin such a tool? sH |
|
|
|
|
|
#2 |
|
Professional Programmer
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 314
Rep Power: 4
![]() |
Very briefly, regular expressions. I'd write this tool in Perl, but Tcl would do too since it has good regexp support.
There's a regexp tutorial at http://analyser.oli.tudelft.nl/regex/index.html.en and information on Perl and Tcl at http://www.perl.org/ and http://www.tcl.tk/ respectively. Tcl is easier to pick up quickly if you don't know either language. I don't think I'd try to tackle this with a shell script, although I know some die-hards who would. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|