#! /bin/bash

for filename in *.fits
do
    if [ -f "$filename" ]
    then
        fname=`basename $filename`
        n=`echo $fname | sed -e "s/\.fits//"`
        $CONVERT_DIR/fits2ndf  container=true extable=extable.txt profits=true fmtcnv=true in=${n}.fits out=$n
    fi
done
