Question Locked

Batch File help

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi all,

I want to extract data from 2 lines of an existing text file and then input that data into a another file
eg

description COLO002154 CUST=Mini Centre Ltd ? Dash)
ip address xxx.xxx.xxx.xxx 255.255.255.240
and then export that data into another file

description COLO002154 (100BT/TX) (CUST=Mini Centre Ltd ? Dash)
ip address xxx.xxx.xxx.xxx 255.255.255.240
ip verify unicast source reachable-via any
no ip redirects
no ip unreachables
no ip proxy-arp
no ip mroute-cache
speed 100
duplex full
storm-control broadcast level 1.00
storm-control multicast level 1.00
no cdp enable
no shut

I would also like to assign an interface if possible so i can copy and past onto my cisco switch.

many thanks

Sean

2 replies

by scott_heath

you can use vbscript to parse the file and look for an identifier on the line that is unique from the others. Then you pukk out the line or data on the line you need and stuff it into the other file. If you need additional help writing the script let me know.

This discussion is closed to new replies.