CheckConfPass.sh 889 Bytes
#!/bin/bash
 
#################################################
# File :    CheckConfPass.sh                    #
# Brief :   Check Conf Pass                     #
# Author :  Jean-François Rey                   #
# Version : 1.0                                 #
# Date :    17/06/13                            #
#################################################
 
# configuration file
. "$OTMEDIA_HOME/cfg/ConfPass.cfg"

# check_conf_pass_usf(usffilenamefullpath)
# -usffilenamefullpath : full path to usf file
# return 0 if ok, otherwise return 1
function check_conf_pass_usf()
{
    if [ $# -ne 1 ]
    then 
        if [ -e "$1" ] && [ -s "$1" ]
        then
            temp=`grep -c -E 'confidence="0.600"' "$1"`
            if [ $temp -gt 200 ]
            then
                return 1
            fi
        else
            return 1
        fi
    fi
    
    return 0
}