shell script to automate the Lucene search

Wrote my first shell script to automate the Lucene search that handles searching for this blog. Got the goods here on shell scripting and stuff here on Cron. End result: a shell script that updates the Lucene index for this blog and pipes the output of the index script to an email:

#!/bin/bash
# Script that indexes the appropriate directories
# using Lucence & Java
cd /usr/hosts/cephas.net/wwwroot/blog/
java -cp /usr/hosts/cephas.net/wwwroot/WEB-INF/lib/lucene-demos-1.2.jar:
/usr/hosts/cephas.net/wwwroot/WEB-INF/lib/lucene-1.2.jar org.apache.lucene.demo.IndexHTML
-create -index /usr/hosts/cephas.net/wwwroot/blog/index/ .. | mail -s “LUCENE[cephas.net/blog]” aaron.s.johnson@gmail.com

Leave a Reply

Your email address will not be published. Required fields are marked *