Annotation of 43BSDReno/contrib/isode-beta/snmp/gawk-2.11/s-netstat/s-netstat.sh, revision 1.1

1.1     ! root        1: : run this script through /bin/sh
        !             2: 
        !             3: P=/usr/local/lib/awk
        !             4: 
        !             5: F=mib.connections S= T=mib.protocols
        !             6: 
        !             7: agent= community= flags=
        !             8: 
        !             9: for A in $*
        !            10: do
        !            11:     case $A in
        !            12:        -a)     flags="$flags -v aflag=1" ;;
        !            13:        -n)     ;;
        !            14:        -o)     flags="$flags -v oflag=1" ;;
        !            15:        -s)     S=1 flags="$flags -v sflag=1" ;;
        !            16:        -t)     echo "$A: unimplemented (warning)" 1>&2 ;;
        !            17:        -A)     echo "$A: unimplemented (warning)" 1>&2 ;;
        !            18: 
        !            19:        -m)     F=mib.mbufs T=mib.mbufs ;;
        !            20:        -i)     F=mib.interfaces T=mib.interfaces ;;
        !            21:        -h)     echo "hosts: no MIB-II support" 1>&2
        !            22:                exit 1 ;;
        !            23:        -r)     F=mib.routes T=mib.routes ;;
        !            24:        -z)     F=mib.arp T=mib.arp ;;
        !            25:        -Z)     F=mib.system T=mib.system ;;
        !            26:        -e)     F=mib.egp T=mib.egp ;;
        !            27: 
        !            28:        -*)     echo "$A: unknown flag" 1>&2
        !            29:                exit 1 ;;
        !            30:        
        !            31:        *)      if [ "x$agent" = "x" ]; then
        !            32:                    agent="-v AGENT=$A"
        !            33:                elif [ "x$community" = "x" ]; then
        !            34:                    community="-v COMMUNITY=$A"
        !            35:                else
        !            36:                    echo "usage: s-netstat [switches] [agent [community]]" 1>&2
        !            37:                    exit 1
        !            38:                fi ;;
        !            39:     esac
        !            40: done
        !            41: 
        !            42: if [ "x$S" != "x" ]; then
        !            43:     F="$T"
        !            44: fi
        !            45: 
        !            46: if [ ! -f $F ]; then
        !            47:     F="$P/$F"
        !            48: fi
        !            49: 
        !            50: exec gawk $flags $agent $community -f $F

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.