set -x

while [ true ]; do
	actlist=' 2004-07-06_154010_3.adtlog 2005-02-14_102749_164.log 2005-02-07_082153_107.vlog'
	m='2005-02-04_222748_84.log'
	grepout=`echo "$actlist"|grep "$m"`
	tcerr=$?
	if [ "$tcerr" -ne "1" ]; then
		if [ "$tcerr" -eq "0" ]; then
			if [ -z "$grepout" ]; then
				echo "Grep screwed up and returned code 0 / found."
				break
			fi
		else
			echo "Grep failed with error $tcerr."
		fi
	fi
done

