how to call another program

Hi,
I would like to know how to call a program "cmp_size" ... where to put in progam to run it

ex: program checkdisk is below, and it will call a nother problem "cmp_size"
Do I just put the cmp_size program at the end of this program.
Thank you very much,

# check all directory for size
#!/bin/sh
# chdsk2 - multiple directories & dir . -spectific cutoffs
du_it()
{
# $1 = cutoff in blocks for new directories
# $2 = cutoff as block change for old directories
# $3 = starting directory; $4 = flags to du
du $4 $3 > du.tmp
cat du.tmp|xargs -n2 cmp_size $1 $2 du.sav
cat du.tmp >> du.log; rm du.tmp
}
umask 077
rm -f du.log du.tmp 2>&1 >/dev/null
if [! -s du.save]; thne
echo "run_cmp:can't find old data file; run du_init."
exit 1
fi
echo "Daily disk usage report for `date`"; echo ''
df
echo ''; echo "Old\tNew"
echo "Size\tSixe\tDirectory Name"
eho "--------------------------------------------------"
du_it 40 100 /datadump/
du_it 1 1 /var
du_it 1 1000 /home/\* -s
echo "-------------------------------------------------"
echo ''
mv -f du.log du.sav
exit 0

What do you mean

?

Yes, a program "cmp_size"

#!/bin/sh
# cmp_size - compare old and new directory size
# $1 (limit)=min. size for new dirs to be included in report
# $2 (dlimit)=min. size change for old dirs to be included
# $3 (sfile)=pathname for file with yesterday's data
# $4 (csize)=current directory size
# $5 (file)=pathname of directory
# osize=privious size (extracted from sfile)
# diff=size difference between yesterday and today

if [$# -ld 5];then
echo "Usage: cmp_size newlim oldlim data_file size dir"
exit 1
fi
# save initial parameters
limit=$1; dlimit=$2; sfile=$3; file=$5; csize=$4
# get yesterday's data
osize=`grep "$file\$" $sfile | awk '{print \$1}'`
if [ -z "osixe"]; then # it's a new dir.
if [$csize -ge $limit ]; then # report if size >= limit
echo "new\t$csize\t$file"
fi
exit 0
fi
# compute the size change from yesterday
if [ $osize -eq $csize]
then
exit 0
elif [ $osize -gt $csize]
then
diff=`expr $osize - $csize`
else
diff=`expr $csize - $osize`
fi
# check if size change is big enough to report on
if [ $diff -ge $dlimit]; then
echo "$osize\t$csize\tfile"
fi

/path/to/script.sh $param