[Mailman-Users] archive search engine?

John van V apps_adm at puny.vm.com
Thu Aug 10 21:01:27 CEST 2000

I'm using this shell cgi to search perl plain ole docs,

I grep thru text files and then href to html versions.

Since mail is ~supposed~ to be text, you can even eliminate one step.

The key to searching different directories is the find statement, not used here.

Great intra-net-warz...

But, the `eval` section has most people thinking I'm crazy, so please check the perl meta-eliminator...
and email me if you can crack it ;)


echo Content-type: text/html

echo "<html>"
echo "<body background=/images/cuniform.gif>"
echo "<tmpl_include \"/puny.css\">" ;
echo "<LINK rel=\"stylesheet\" href=\"http://puny.vm.com/puny.css\"> ";

cd /usr/lib/perl5/5.00503/pod

QUERY_STRING=`echo $QUERY_STRING | perl -ne 's/(\;|exec|\\\|\\\`|\>|\!|\\||\&|\(|\)|\\\$|\{|\[)//g; print '`


echo "
<TABLE border=5 ><TD>
<form method=get name=GREP action=http://puny.vm.com/cgi-bin/pod_grep.cgi>
   <input type=text value=$GREP size=32 name=GREP maxlength=128 text=$GREP>
#echo "<HR><H2>$GREP<H2><HR>"

echo $QUERY

files=`grep -l $GREP *`

for i in $files
href=`echo $i | perl -ne 's/\.pod//;print'` 
echo "<table width=80% align=center border=3 class=doctext><td class=doctext>
<a href=/pub/perl/pod/$href.html><BR><h3 class=doctext> $i </h3></a>
<h4 class=doctext>"
pod2text $i | grep -C $GREP | more
echo "</td></table><BR>"

for i in $x
echo $i

echo "<br>"

echo "<br>"
echo "<br>"
echo "</body>"  
echo "</html>"

More information about the Mailman-Users mailing list