#!/bin/sh

if [ "$0" = ./rd_init ]; then
	. ./functions
	lib_dir="$(/bin/pwd)"
else
	. /usr/share/predator/functions
fi

export LC_ALL=C

workdir=$1
shift

for i in $*
do
    egrep -f $i $(get_content_indexes $workdir)|cut -f2 -d:|cut -f1
done
