#!/bin/bash
#  jpgcom2txt for fotohtml
## 2019-1-20
if [ -e out.txt ]
then
   echo "out.txt exists. Delete? or Ctrl-C"
   read tmp
   rm out.txt
fi

echo "Put title here" >> out.txt
echo "  " >> out.txt
#FILES=./*.jpg
RAWFILES=*.jpg
echo $RAWFILES

echo "trial:"
(echo $RAWFILES| tr " " "\n" | sort | tr "\n" " ")

FILES=$(echo $RAWFILES| tr " " "\n" | sort | tr "\n" " ")
# sort added 190125
echo ""
echo "FILES: $FILES"

for f in $FILES
do
  cc=`rdjpgcom $f`
  echo "$f: $cc" >>out.txt
  echo "" >>out.txt
#  read TMP
done

