#!/pkg/bin/ksh
###
### June 2012, Harsha Girish Chandra
###
### Copyright (c) 2004-2013 by cisco Systems, Inc.
### All rights reserved.

show_ipv4_rib -X 0x1 -Y 0x1 -Z all -V ________ -} 0x0 | grep -v "Refcount" | grep -v "VRF" | grep -v "-" | cut -c0-9 > /disk0:/rpf_tmp

sum=0
for num in $(cat /disk0:/rpf_tmp)
    do
        ((sum+=num))
done
echo "Total number of prefixes with rpf list"
echo $sum
rm /disk0:/rpf_tmp
