3
# Usage: mibfetch [ -d outdir ] host directory rfc [mibs]
5
# If "rfc" contains a "." it is expected to be a complete file name,
6
# otherwise it is assumed to be just the rfc number.
7
# If "mibs" is specified, it is a ":" separated list of mibs to extract,
8
# otherwise all mibs are extracted.
10
# The script fetches the file from the givn directory on the given
11
# host, and then runs the file through smistrip to extract the mibs.
15
if [ "$1" = "-d" ]; then
21
if [ "$1" = "-x" ]; then
31
if [ $exact = 0 -a `echo $rfc | sed 's/\.//'` = $rfc ]; then
41
# ncftpget -FV ftp://$host/$dir/$file
42
wget -O - -nv $host/$dir/$file | tr -d \\r > $file
44
./smistrip -x .txt $mdir $mibs $file