#!/bin/sh
# the next line restarts using tclsh -*- tcl -*- \
exec tclsh "$0" "$@"

package require Tnm 2.2

# Check the command line.

if {$argc != 1} {
    puts stderr "usage: [file tail $argv0] expression"
    exit 1
}

# Search for matching object descriptors.

mib walk oid 1 {
    set label [mib name $oid]
    if [regexp $argv $label] {
	puts [format {%-32s %-20s (%s, %s)} \
		$oid $label [mib module $oid] [file tail [mib file $oid]]]
    }
}
