I have main program calling Run_Time function which return number of minutes in decimal point. I tried to add the total minutes but having problem with it. Can someone help me ...
example:
pmart@satpai30:/vframe/STRODS/indata/log>file_detail.sh F381 F382
3.42 minutes to load F381
/vframe/STR/bin/file_detail.sh[3]: stack empty: syntax error
2.62 minutes to load F382
/vframe/STR/bin/file_detail.sh[3]: stack empty: syntax error
------------------------------
Total:
Add ()
{
rx=`echo 5 k $rx + $1 | dc`
}
#Main Program
#get_tempfile SQLFILE $VF_SQL sql # The .sql file used by sqlplus
SQLFILE="$VF_TEMP/$SCRIPT_NAME.sql"
if test $# != 0
then
until test $# == 0
do
Run_Time=$(Run_Time $1)
echo "$Run_Time minutes to load $1"
Total=$(Add $Run_Time)
shift
done
fi
echo "------------------------------"
echo "Total:$Total"
example:
pmart@satpai30:/vframe/STRODS/indata/log>file_detail.sh F381 F382
3.42 minutes to load F381
/vframe/STR/bin/file_detail.sh[3]: stack empty: syntax error
2.62 minutes to load F382
/vframe/STR/bin/file_detail.sh[3]: stack empty: syntax error
------------------------------
Total:
Add ()
{
rx=`echo 5 k $rx + $1 | dc`
}
#Main Program
#get_tempfile SQLFILE $VF_SQL sql # The .sql file used by sqlplus
SQLFILE="$VF_TEMP/$SCRIPT_NAME.sql"
if test $# != 0
then
until test $# == 0
do
Run_Time=$(Run_Time $1)
echo "$Run_Time minutes to load $1"
Total=$(Add $Run_Time)
shift
done
fi
echo "------------------------------"
echo "Total:$Total"