Advertisement
nightcrow100

nightcrow

Jul 5th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.26 KB | None | 0 0
  1. string = u"""Router# show ip interface brief
  2. Interface     IP-Address     OK?  Method  Status                  Protocol
  3. Ethernet0     10.108.00.5    YES  NVRAM   up                      up
  4. Ethernet1     unassigned     YES  unset   administratively down   down
  5. Loopback0     10.108.200.5   YES  NVRAM   up                      up
  6. Serial0       10.108.100.5   YES  NVRAM   up                      up
  7. Serial1       10.108.40.5    YES  NVRAM   up                      up
  8. Serial2       10.108.100.5   YES  manual  up                      up
  9. Serial3       unassigned     YES  unset   administratively down   down"""
  10.  
  11. list =[]
  12. for i in string:
  13.     list = string.split()
  14. print list
  15.  
  16. [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