Post Web IP Address For Unix System

You might also like

Download as doc
Download as doc
You are on page 1of 2

Project

Create Script to post Web


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

You might also like