Код: Выделить всё
data=/home/mangos/data
ls Sources/ytdb/R55/Updates/55?_* | grep mangos > $data
find compile/ -type f -name "*mangos*" |grep sql | grep addi | sort | grep -v events | grep -v teleguy >> $data
while read DATA; do
file=`echo $DATA | awk '{print $1}'`
mysql -u${user} -p${password} $database < $file
done < $data