DON'T USE YET, I found a problem, when this line is away it should be solved =)
file="/path/to/file"
data=""
data=`cat $file`
serial=""
for i in "$file"; do
if [ `expr index "$i" .` = 1 ]
then
serial=`echo $i | tr -dc '[0-9]'`
else
echo `echo $i | tr -dc '[0-9]'` >> $serial.txt
fi
done
I didn't test this so be aware =D
the for loop goes trough every line of the file specified in line 1,
the if loop checks weither the line starts with a . (dot),
if it starts with a dot, it get's the serial number
otherwise it will append the article information to a file with the serial number as a name.
I hope it works =D