Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, March 28, 2024

File: [Platon] / yaadfat / stats.sh (download)

Revision 1.1.1.1 (vendor branch), Sun Feb 23 17:43:01 2003 UTC (21 years, 1 month ago) by yenar


Changes since 1.1: +0 -0 lines

initial import of yaadfat into platon cvs

#!/bin/sh
# copyright 2002 yenar@host.sk
# covered by GNU LGPL

tl=0
tb=0
filter=$1

if [ -z "$filter" ]; then
    filter="cat"
fi

for d in $(find -type d -not -name CVS -not -name .libs -not -name .deps); do
    dl=0
    db=0
    for f in $(cd $d && echo *.c *.h); do
        fl=$(cat $d/$f 2>/dev/null | $filter | wc -l)
        fb=$(cat $d/$f 2>/dev/null | $filter | wc -c)
        fl=$(($fl))
        fb=$(($fb))
        if [ "$fb" != "0" ] && ! echo $f | grep '\*' >& /dev/null; then
            echo -e "$d/$f:\t$fl\t$fb" | expand -t 30
        fi
        dl=$(($dl+$fl))
        db=$(($db+$fb))
    done
    if [ $db != 0 ]; then
        dirs="$dirs\n$d:\t$dl\t$db"
        echo
    fi
    tl=$(($tl+$dl))
    tb=$(($tb+$db))
done
echo -e $dirs | expand -t 30
echo -e "\ntotal:\t$tl\t$tb" | expand -t 30;

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top