I’m often given huge lists of MAC addresses and they tend to arrive in a variety of different formats. Such as the following:
Typically I need them formatted as the last example above, with colons between every 2 characters.
The formula below works great in Excel, where A2 is the cell you’re targeting:
I was a little reluctant to push out a change that would affect nearly 600 Access Points, so I wanted to do it in batches of 100. As the method of input was CSV, I needed to break this up.
The Split command from the GNU coreutils was the perfect solution for my needs.
split -l 100 list.csv –additional-suffix=.csv output/test -d
The output of that command produces the following files, each with 100 lines of data and places them inside the directory named output.
Without the –additional-suffice and -d options the files would not have the extension I was looking for, and it would have been ordered alphabetically instead of numerically.