#!/bin/csh
limit stacksize unlimited
while (1)
	ps aux | grep "fics -p 5000" | grep -v grep >! fics.pid
	if (-z fics.pid ) then
#		echo "doing mv stuff and running fics"
		cat console.txt >>! console.old
		rm console.txt
		fics -p 5000 >>&! console.txt
		endif
#	echo "sleeping..."
	sleep 10
end