News, articles, tips and tools covering shell scripting and command-line interfaces of all flavors.

Subscribe to News, articles, tips and tools covering shell scripting and command-line interfaces of all flavors. feed
News, articles, tips and tools covering shell scripting and command-line interfaces of all flavors.News, articles, tips and tools covering shell scripting and command-line interfaces of all flavors.
Updated: 14 min ago

Seems Easy...I am missing something though

Tue, 12/11/2018 - 11:10

Hi All,

I am trying to run a script on my FreeBSD machine. It is a script to reach out via SNMPWalk to all my switches and routers to see if they are responding to SNMP. Here is the script. (No Bash on the machine and I cannot add it)

#!/bin/sh while read TestIPList do snmpwalk -v3 -u SNMPUSER -l AuthPriv -a SHA -A PASSPHRASE -x AES -X PASSPHRASE $TestIPList 1.3.6.1.2.1.47.1.1.1.1.13.1 done < /data1/users/admin/SNMPLoop/output.txt

It runs, but nothing is in my output file.

Id expect to see the SNMP OID I have identified which is the Model of the device. I can run the snmpwalk alone on the devices without the script.

Since I am fairly new to scripting, any help or tweaks would be appreciated.

Thank you,

submitted by /u/Bigdaddyfatback8
[link] [comments]