Advertisement
Izya12

name.sh

Oct 18th, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.70 KB | None | 0 0
  1. #/bin/bash
  2. . "/etc/CFG_FULL.cfg"
  3. cd $pwd/name
  4. _out="$pwd/name/tmp.tmp"
  5.  
  6. while read data
  7. do
  8. ip=$(echo "$data" | awk '{print$1}')
  9. name2=$(echo "$data" | awk '{print$3}')
  10.  
  11. echo "$ip - $name2"
  12.  
  13. snmpset -v2c -c $CommunityRW $ip SNMPv2-MIB::sysName.0 s $name2
  14. snmpset -v2c -c $CommunityRW $ip SNMPv2-MIB::sysLocation.0 s $name2
  15.  
  16. echo ""
  17.  
  18. #wget -U "Mozilla/5.0" -qO${_out} "http://translate.google.com/translate_a/t?client=t&text=$$ip&sl=auto&tl=ru" | sed 's/\[\[\[\"//' | cut -d \" -f 1
  19. #wget -q -O ${_out} http://translate.yandex.ru/tr.json/translate --post-data="srv=tr-text&lang=ru-en&text=$ip"
  20. #sed -i 's/"//g' ${_out}
  21. #cat ${_out}
  22. #echo "$translate"
  23.  
  24. done < $pwd/name/error.list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement