#!/bin/sh
# making a directory with human-readable tables from all ies files

 if ! [ -a tab ] ; then mkdir tab ; fi
 for F in *.ies 
  do X=${F/.ies/}.txt
  ies2tab $@ $F >tab/$X
  if [ $? -eq 106 ] 
  then
# input file has comma-ended numbers, replacing commas with blanks:
   cp $F /tmp/$F
   chmod +w /tmp/$F
   nons2bla /tmp/$F 44 32 >/dev/null
   ies2tab $@ /tmp/$F >>tab/$X
  fi
  if [ $? -ge 1 ] 
  then 
   echo "cannot process file $F - data format non-conforming to ies2tab"
  fi
 done

