This script uses Unix commands like telnet, fgrep, cut, and ftp to retrieve the IP address from a Netvanta 2050 gateway and post it to a file on a website. It logs into the gateway using telnet, runs a "show ip" command to get the IP address information, extracts the address string, and saves it to a local file. A separate ftp script then logs into a website, uploads the local file, and exits.
This script uses Unix commands like telnet, fgrep, cut, and ftp to retrieve the IP address from a Netvanta 2050 gateway and post it to a file on a website. It logs into the gateway using telnet, runs a "show ip" command to get the IP address information, extracts the address string, and saves it to a local file. A separate ftp script then logs into a website, uploads the local file, and exits.
This script uses Unix commands like telnet, fgrep, cut, and ftp to retrieve the IP address from a Netvanta 2050 gateway and post it to a file on a website. It logs into the gateway using telnet, runs a "show ip" command to get the IP address information, extracts the address string, and saves it to a local file. A separate ftp script then logs into a website, uploads the local file, and exits.
This script uses Unix commands like telnet, fgrep, cut, and ftp to retrieve the IP address from a Netvanta 2050 gateway and post it to a file on a website. It logs into the gateway using telnet, runs a "show ip" command to get the IP address information, extracts the address string, and saves it to a local file. A separate ftp script then logs into a website, uploads the local file, and exits.
IP Address for Unix System Unix Script to get Web IP Address # script for netvanta 2050 ( echo open {ip address goes here} sleep 1 echo {username goes here} sleep 1 echo {password goes here} sleep 1 echo show ip interfaces ppp 1 #{show ip command} sleep 2 echo exit ) | telnet 1> /tmp/ipfull.txt 2>/dev/null # # returns IP Address info only # fgrep 'Ip address' /tmp/ipfull.txt | cut -f6 -d' '
• This scrip uses the unique features of
Unix telnet, fgrep & cut commands to get the Web IP Address from the Netvanta 2050 gateway Unix Script to post IP Address ftp -n -v www.yourcompany.com << EOF user {username goes here} {password goes here} prompt off binary lcd /tmp delete {your filename goes here}.txt put {your filename goes here}.txt bye EOF
• This scrip uses the unique features of
Unix ftp to post the Unix IP Address text information to a www.yourcompany.com