[geeks] regex question, I suppose...
Peter L. Wargo
geeks at sunhelp.org
Fri Aug 24 00:52:09 CDT 2001
On Fri, 24 Aug 2001, Tim Harrison wrote:
> Let's say I have a listing of a few thousand MAC addresses in the Cisco
> style format ( xxxx.xxxx.xxxx ) and I want to change those into the
> standard format ( xx.xx.xx.xx.xx.xx ). What would one use?
Depends on if you want to use sed, awk, or perl... You could easily do it
w/awk, using . as a seperator.
If you want, I could probably whip up a perl script for ya pretty quick.
Read the line, chop it into 3 elements, split the elements in 1/2, output
a string of all them catted back together.
-pete
More information about the geeks
mailing list