From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/33671 Path: main.gmane.org!not-for-mail From: Harry Putnam Newsgroups: gmane.emacs.gnus.general Subject: `World Class' break through in software dev Date: 14 Dec 2000 19:21:27 -0800 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035169732 26306 80.91.224.250 (21 Oct 2002 03:08:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:08:52 +0000 (UTC) Return-Path: Original-Received: from lisa.math.uh.edu (lisa.math.uh.edu [129.7.128.49]) by mailhost.sclp.com (Postfix) with ESMTP id 3BCEED049D for ; Thu, 14 Dec 2000 22:29:42 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by lisa.math.uh.edu (8.9.1/8.9.1) with ESMTP id VAB11497; Thu, 14 Dec 2000 21:29:40 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 14 Dec 2000 21:28:27 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@66-209.196.61.interliant.com [209.196.61.66] (may be forged)) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id VAA12695 for ; Thu, 14 Dec 2000 21:28:14 -0600 (CST) Original-Received: from freedom.LABridge.com (home.LABridge.com [206.117.169.5]) by mailhost.sclp.com (Postfix) with ESMTP id F1D85D049D for ; Thu, 14 Dec 2000 22:28:35 -0500 (EST) Original-Received: from reader.labridge.com (DSL02-160.LABridge.com [206.117.4.160]) by freedom.LABridge.com (8.8.8/8.8.8) with ESMTP id TAA00219 for ; Thu, 14 Dec 2000 19:30:29 -0800 Original-Received: (from reader@localhost) by reader.labridge.com (8.9.3/8.9.3) id TAA14293; Thu, 14 Dec 2000 19:28:30 -0800 X-Authentication-Warning: reader.labridge.com: reader set sender to reader@newsguy.com using -f Original-To: ding@gnus.org User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.5 Original-Lines: 294 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:33671 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:33671 --=-=-= Announcing the prerelease of the AMMMAAAZZZINGG....... `agentsch' There is a general stirring in the software dev community with this prerelease of the AMMMAZZZING first part of the ASSSTOUNDING: `AgentHelperKit' suite This first precursor model, just one of a coming suite, is designed to help `agent' users search the files they've accumulated under News/agent. Please send lots of money to my numbered Swiss Bank accounts. I will be publishing addresses throughout usenet for the next two weeks... On the real side..... If I don't get horse whipped or horse laughed off the list for posting an attachment and a non-lisp one at that..... I hope someone finds this search tool useful. I use it constantly and find it to be very precise and useful. Very unpolished of course and has lots of things remaining to be done like some kind of basic integration into nnir. This tool was built under bash-2.04 and RedHat Linux 6.2. It may break on other Machines and shells. Hope it doesn't blow up and throw files on anyone. Please send feedback if you do decide to try it out. The output is formatted in what seems like a generally useful way making it easy to retrieve messages if so desired. A few stats are printed at the end that will be of interest, including start and end time. `agentsch' is based on shell scripting and awk with the heavy work being done by awk. It is designed to search the numbered messages under News/agent or in `nnml' groups. This tool requires 3 regexp to work and only returns hits if all three are found in one message. Two are aimed at the headers and one at the body. Any users please read the documentation included. You can access it by typing `agentsch -H ' I tried to explain well as I could to make it easy to use. Its a bit clunky and uses a tmpfile to avoid the `too many command line args' problem that arises when thousands of files are searched. I had a version that used `xargs' for that but that presented other problems concerning `awks' use of BEGIN and END clauses. There is a more sophisticated model underway that will handle up to 6 RE (3 head 3 body) and in any combination. That will be a very exact search tool. No boolean fuzziness, just straight regular expression searching. This tool is not fast and relies on no database, but even against as many as 60,000 messages it isn't all that slow either. There are two ways to control where the search is directed. The obvious one is using the "-d" flag (required) to name the parent directory searched. But the tool will find numbered files at any depth of nesting if you feed it a parent directory. The other is to use `Xref:' in mail or `Newsgroups:' in news with the "-t" flag that allows the user to set two custom regexp for the headers. To get full usage details type: `agentsch -H' --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=agentsch Content-Description: shell/awk script #!/bin/sh START=`daten` RHS="^Subject: " RHM="^Message-ID: " RHF="^From: " STRING="" REH1="" REH2="" REB="" usage1 () { cat >&2 <&2 <> FILES.tmp awk 'BEGIN { list_of_files = ARGV[1] delete ARGV[1] ARGC = 1 while ((getline fname < list_of_files) > 0) { ARGV[ARGC] = fname ARGC++ } } { if ("'"$STRING"'") { split("'"$STRING"'", HR,"%") RE1_p = HR[1] RE2_p = HR[2] RE3_p = '"\"$REB\""' }else { RE1_p = '"\"$REH1\""' RE2_p = '"\"$REH2\""' RE3_p = '"\"$REB\""' } } { if (FNR == 1 && RE3_l) { print "-- \n" a = "" } if (FNR == 1 ) { in_header = 1 in_matched = 0 RE1_l = "" RE2_l = "" RE3_l = "" }else if (in_header && /^$/) { in_header = 0 if (RE1_l && RE2_l) { in_matched = 1 } } if (in_header) { # in header section if ($0 ~ RE1_p) { RE1_l = $0 } else if ($0 ~ RE2_p) { RE2_l = $0 } } else if (in_matched) { # in body of matched message if ($0 ~ RE3_p) { if (! RE3_l) { a = 1 filename2=FILENAME sub(/^.*\//,"",filename2) print FILENAME print filename2"|" RE1_l print filename2"|" RE2_l } RE3_l = $0 print filename2"|"FNR"|" RE3_l # filename2 = "" } } else { # in body of unmatched message nextfile # GNU awk extension to skip to next file } } END { if (RE_l) { print "-- " }else { print "Regular expressions used:" print "Header1 = "RE1_p"\nHeader2 = "RE2_p"\nBody = "RE3_p print "Searched: \t"ARGC" files\t" NR" lines" print "under directory"'"\" $DIRECTORY"\"'} }' FILES.tmp rm -f FILES.tmp FINISH=`daten` echo " Finish = $FINISH" echo " Start = $START" --=-=-=--