hello
any help appreciated here -
i am fairly new to sed but am working through the examples
what id like to do is create a databased of ip addresses to names (like a hosts file) and have sed reference it when using telnet
for example - if i log into a router which has Ip address 10.20.30.40 and i do a 'show ip route' i would usually see
10.20.30.40 - connected - or similar
what i would like is to have it show
'my router - connected'
so far i have two issues - first - when i telnet x.x.x.x | sed 's/x.x.x.x/my router' i suddenly cannot see my cursor
and secondly - id like sed to reference a whole database of resolved ip addresses - but NOT use the /etc/hosts/ file - but one ive created
can someone help me out with this pls.
thanks
any help appreciated here -
i am fairly new to sed but am working through the examples
what id like to do is create a databased of ip addresses to names (like a hosts file) and have sed reference it when using telnet
for example - if i log into a router which has Ip address 10.20.30.40 and i do a 'show ip route' i would usually see
10.20.30.40 - connected - or similar
what i would like is to have it show
'my router - connected'
so far i have two issues - first - when i telnet x.x.x.x | sed 's/x.x.x.x/my router' i suddenly cannot see my cursor
and secondly - id like sed to reference a whole database of resolved ip addresses - but NOT use the /etc/hosts/ file - but one ive created
can someone help me out with this pls.
thanks