Dir=orig_swlistings
GetDocs=0

if [ $# -gt 0 ]
then
   if [ $1 = "-docs" ]; then GetDocs=1; fi
fi

for x in `ls swlist.*`
do
  if [ GetDocs -eq 1 ]
  then
    echo "Parsing $x with acceSS7 documentation"
    ./ParseSwlisting $x -docs
  else
    echo "Parsing $x"
    ./ParseSwlisting $x
  fi
  mv $x $Dir/.
done
