#!/bin/sh
rm -f docdirs
touch docdirs
for dir
in *
do
if [ -d ${dir} ]
then
if [ -f ${dir}/main.tex ]
echo ${dir} >> docdirs
fi
done