Mac Address Converter 0000000000

By tipstir ยท 4 replies
Jun 26, 2007
  1. 1. go from this: 0000000000 to this: 00-00-00-00-00-00


    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.
  2. Nodsu

    Nodsu TS Rookie Posts: 5,837   +6

    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
    < input.txt sed 's/\(..\)/\1-/g' | sed 's/-$//' > output.txt
    This specific magic chant assumes a text file with one MAC address per line.
  3. tipstir

    tipstir TS Ambassador Topic Starter Posts: 2,477   +126

    This program right for SED for Windows which we use here.
    GNU sed I'll give this a shot and see what happens? Thanks for you help! :) All I could find was perl script for UNIX process...
  4. Nodsu

    Nodsu TS Rookie Posts: 5,837   +6

    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 :)
  5. tipstir

    tipstir TS Ambassador Topic Starter Posts: 2,477   +126

    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..
Topic Status:
Not open for further replies.

Similar Topics

Add your comment to this article

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...