function check_users_conf_format () {

if [ -s "${USERS_CONF}" ]; then
    no_of_fields=`awk -F: 'NR==1{print NF}' ${USERS_CONF}`
    if [ $no_of_fields -le 4 ]; then
        echo "File ${USERS_CONF} is in the old format"
        echo "Please update to the following"
        echo "uid:login:gid:group:VO:sgm_flag"
        exit 1
    fi

    no_of_commas=`cat $USERS_CONF | perl -e 'while (<>) { $a=$_; $a=~s/[^,]//g; if (length($a)%2 !=0 ) {exit -1}} ; exit 0 ;';`
    retval=$?
    if [ $retval -ne 0 ]; then
     echo "ERROR: Some line does not contain the same number of group IDs and group names ! Please check ! Exiting."
     exit 1
    fi
fi

}
