Mac Address Converter 0000000000

Status
Not open for further replies.

tipstir

Posts: 2,873   +206
1. go from this: 0000000000 to this: 00-00-00-00-00-00

or

2. go from this: 0a0b0c0d0e0f0d to this: 0a-0b-0c-0d-0e-0f-0d

got a lot of mac address to convert and it takes it time to do it well me...
Excel can with a custom script can do step 1, but in step 2 it won't do anything.
 
This sort of depends on the exact input, but if you have a real OS (not Windows) or you get the sed utility for Windows, you could run a single command like
Code:
< input.txt sed 's/\(..\)/\1-/g' | sed 's/-$//' > output.txt
This specific magic chant assumes a text file with one MAC address per line.
 
May need some tweaking if you run it under Windows.. The redirection (<>|) and escapes \ work differently in DOS/Windows command line.

If all else fails, install Cygwin or MSYS and run sed from there :)
 
I've posted this question here and gbpvr forum and the answer was to use the MID function in excel which would give me the results I needed. Took a few attempts but now it working correctly. Also out senior network engineer wanted to know if the MID function could work to show what he sees in the domain router for MAC address so it does work we just tested here.

Thanks again Nodsu..

See this link below above all the coding that was used..
http://forums.gbpvr.com/showthread.php?p=204656#post204656
 
Status
Not open for further replies.
Back