Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string = u"""Router# show ip interface brief
- Interface IP-Address OK? Method Status Protocol
- Ethernet0 10.108.00.5 YES NVRAM up up
- Ethernet1 unassigned YES unset administratively down down
- Loopback0 10.108.200.5 YES NVRAM up up
- Serial0 10.108.100.5 YES NVRAM up up
- Serial1 10.108.40.5 YES NVRAM up up
- Serial2 10.108.100.5 YES manual up up
- Serial3 unassigned YES unset administratively down down"""
- list =[]
- for i in string:
- list = string.split()
- print list
- [u'Router#', u'show', u'ip', u'interface', u'brief', u'Interface', u'IP-Address', u'OK?', u'Method', u'Status', u'Protocol', u'Ethernet0', u'10.108.00.5', u'YES', u'NVRAM', u'up', u'up', u'Ethernet1', u'unassigned', u'YES', u'unset', u'administratively', u'down', u'down', u'Loopback0', u'10.108.200.5', u'YES', u'NVRAM', u'up', u'up', u'Serial0', u'10.108.100.5', u'YES', u'NVRAM', u'up', u'up', u'Serial1', u'10.108.40.5', u'YES', u'NVRAM', u'up', u'up', u'Serial2', u'10.108.100.5', u'YES', u'manual', u'up', u'up', u'Serial3', u'unassigned', u'YES', u'unset', u'administratively', u'down', u'down']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement