A sample bash script for sending a list of queries to CroALa / PhiloLogic

#!/bin/bash
# Jovanovic, 2011-12, looking up clausulae in CroALa
# usage: ./muz-croala.sh filename
# take argument, find file
# If we want to find phrases, replace space with + in file! Should put a line here just to be sure...
file=$1
for item in `cat ${file}` # Loop all of the items in the array
do
curl "http://www.ffzg.unizg.hr/klafil/croala/cgi-bin/search3t?dbname=croala&word=${item}" \
 | egrep -i "^for|Your search found <" - >> ${file}-croala-rez
# keep these lines
# and write results to file
done