mbt masai
 
Welcome !
         

                                
After experiencing a lot of down time, We decided to move this site to CrystalTech.com. CrystalTech.com is powered by only the finest Windows servers providing the best performance, reliability, and value anywhere.

 export/convert multiple text files in excel format

Author Message
manuvia

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 7/10/2009
  • Status: offline
export/convert multiple text files in excel format Sunday, July 12, 2009 1:58 AM (permalink)
0
hi scripting expert,
 
i badly need you help, im working on a script that will run "show port status" in a CATOS switch and " sh run interface" on IOS switch.
 
i have the 3 sample files that contains the ff information
 
 
Switch1.txt
--------------
SWITCH-level1#sh int status | i disa|666
Fa1/0/1                      disabled     666          full    100 10/100BaseTX
Fa1/0/5                      disabled     666          full    100 10/100BaseTX
Fa1/0/7                      disabled     666          full    100 10/100BaseTX
Fa1/0/8                      disabled     666          full    100 10/100BaseTX
Fa1/0/9                      disabled     666          full    100 10/100BaseTX
 
 
Switch2.txt
--------------
SWITCH-level2#sh int status | i disa|666
Fa1/0/2                      disabled     666          full    100 10/100BaseTX
Fa1/0/11                    disabled     666          full    100 10/100BaseTX

Switch3.txt
-------------
SWITCH-level3#sh int status | i disa|666
Gi1/1                        disabled     666          auto   1000 10/100/1000-TX
Gi1/2                        disabled     666          auto   1000 10/100/1000-TX
Gi1/3                        disabled     666          auto   1000 10/100/1000-TX
Gi1/4                        disabled     666          auto   1000 10/100/1000-TX
Gi1/5                        disabled     666          auto   1000 10/100/1000-TX
Gi1/6                        disabled     666          auto   1000 10/100/1000-TX
Gi1/7                        disabled     666          auto   1000 10/100/1000-TX
Gi1/8                        disabled     666          auto   1000 10/100/1000-TX
Gi1/9                        disabled     666          auto   1000 10/100/1000-TX
Gi1/10                       disabled     666          auto   1000 10/100/1000-TX
Gi1/11                       disabled     666          auto   1000 10/100/1000-TX
Gi1/12                       disabled     666          auto   1000 10/100/1000-TX
Gi1/13                       disabled     666          auto   1000 10/100/1000-TX
 
 
 
how i can i have an output something like this, in excel format.
 
Switchname          Interface          Status          Vlan      Duplex        Speed       Type
 
SWITCH-level1     Fa1/0/1                      disabled     666          full    100 10/100BaseTX
SWITCH-level1     Fa1/0/5                      disabled     666          full    100 10/100BaseTX
SWITCH-level1     Fa1/0/7                      disabled     666          full    100 10/100BaseTX
SWITCH-level1     Fa1/0/8                      disabled     666          full    100 10/100BaseTX
SWITCH-level1     Fa1/0/9                      disabled     666          full    100 10/100BaseTX
 
SWITCH-level2     Fa1/0/2                      disabled     666          full    100 10/100BaseTX
SWITCH-level2     Fa1/0/11                    disabled     666          full    100 10/100BaseTX
 
SWITCH-level3      Gi1/1                        disabled     666          auto   1000 10/100/1000-TX
SWITCH-level3      Gi1/2                        disabled     666          auto   1000 10/100/1000-TX
SWITCH-level3      Gi1/3                        disabled     666          auto   1000 10/100/1000-TX
SWITCH-level3      Gi1/4                        disabled     666          auto   1000 10/100/1000-TX
SWITCH-level3      Gi1/5                        disabled     666          auto   1000 10/100/1000-TX
SWITCH-level3      Gi1/6                        disabled     666          auto   1000 10/100/1000-TX
SWITCH-level3      Gi1/7                        disabled     666          auto   1000 10/100/1000-TX
SWITCH-level3      Gi1/8                        disabled     666          auto   1000 10/100/1000-TX
SWITCH-level3      Gi1/9                        disabled     666          auto   1000 10/100/1000-TX
SWITCH-level3      Gi1/10                      disabled     666          auto   1000 10/100/1000-TX
SWITCH-level3      Gi1/11                      disabled     666          auto   1000 10/100/1000-TX
SWITCH-level3      Gi1/12                      disabled     666          auto   1000 10/100/1000-TX
SWITCH-level3      Gi1/13                      disabled     666          auto   1000 10/100/1000-TX
 
 
 
this will be my weekly routing to get the port capacity of our switch.. can some please help.. any adive and solution is vermuch appreciated.
 
 
thank you.
#1

    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.8
    mbt shoes www.wileywilson.com