text replace
Not sure if this is the right group, but I am looking for a text replacement
command that is able to convert an ip address into a hyperlink.
For example:
I have the following in my file:
Feb 1 12:37: 192.168.1.2 : WARN-Updown Interface FastEthernet0/38, changed
state to down
Feb 1 12:37: 192.168.1.4 : WARN-Updown Line Protocol on Interface
FastEthernet0/12, changed state to down
I want to output this:
Feb 1 12:37: <a href="telnet://192.168.1.2">192.168.1.2</a> : WARN-Updown
Interface FastEthernet0/38, changed state to down
Feb 1 12:37: <a href=telnet://192.168.1.4>192.168.1.4</a> : WARN-Updown Line
Protocol on Interface FastEthernet0/12, changed state to down
But I'm not sure how to get the 192.168.1.x to the form of <a
href="telnet://192.168.1.x">192.168.1.x</a>
I've searched through sed do***entation, and don't see any way to make this
work. I'm not sure if sed is the way to go. Any help would be appreciated.
Thanks,
Matt
|