if it possible to do a snmpwalk in a perl script and put the output in a table to make a sort of association like for each hostname i have in the same line if index and desc i have the script in bash but the output that i have don't give the association that i want so i need your help
#!/bin/bash
Rep_Scripts='/home/scripts'
out_file='/home/scripts/out_file'
rm -rf $Rep_Scripts/out_file
for i in `cat $Rep_Scripts/IP_ALU_LIST.txt | awk '{print}'`
do
read hostname ip <<< $(echo $i |sed 's/;/ /')
echo "${hostname} ==> ${ip} If_Name" >> out_file
snmpwalk -v2c -c ${ip} OID>> out_file
echo "${hostname} ==> ${ip} Global_If_Index" >> out_file
snmpwalk -v2c -c ${ip} OID >> out_file
echo "${hostname} ==> ${ip} If_Statut" >> out_file
snmpwalk -v2c -c ${ip} OID >> out_file
done
i have in IP_ALU_LIST.txt
router2;89.100.12.100
router3;100.100.100.100