praveen,
coincidently, my solution is very similar to yours.
the issue that i see in your solution is the fact that you are loading
the entire file into one string.
this can cause problems in the performance for large files.
here is my solution not loading the entire file into a string:
code:
typeset -i mpctlimit=50
typeset -i mtimelimit=3
minpfile='b'
mtimere='[0-9][0-9]:[0-9][0-9]:[0-9][0-9]'
mhhre='[0-9][0-9]'
mmmssre='[0-9][0-9]:[0-9][0-9]'
mperctline=`sed -n '/.*%.*/p' ${minpfile}`
mperctvalue=`echo ${mperctline} | sed 's/.*(\([0-9].*\)%).*/\1/'`
echo "mperct = "$mperctvalue" limit = "${mpctlimit}
if [ ${mperctvalue} -gt ${mpctlimit} ];then
echo "above the percentage limit"
fi
mhoursline=`sed -n "/.*${mtimere}.*/p" ${minpfile}`
mhoursvalue=`echo ${mhoursline} | sed "s/.*\(${mhhre}\)

{mmmssre}.*/\1/"`
echo "mhours = "$mhoursvalue" limit = "${mtimelimit}
if [ ${mhoursvalue} -gt ${mtimelimit} ];then