skip to main
|
skip to sidebar
Walking Tiger
Thursday, January 14, 2010
How to convert a mac from Cisco/Foundry format to Unix format
I needed to associate servers to ports on our switches but the formats are different so I needed a way to convert them.
Here is a quick perl one line to go from Cisco/Foundry to Unix:
perl -ane '$_=~s/(..)\.?/\1:/g;$_=~s/:$//g; print $_'
An example:
echo 0019.b9f5.93f3 | perl -ane '$_=~s/(..)\.?/\1:/g;$_=~s/:$//g; print $_'
00:19:b9:f5:93:f3
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Labels
Sun
(7)
solaris
(6)
centos
(5)
linux
(4)
install
(3)
redhat
(3)
x4500
(3)
ESX
(2)
Oracle
(2)
booting
(2)
firmware
(2)
hp
(2)
vmware
(2)
Sunsolve
(1)
apache
(1)
backup
(1)
bash shell
(1)
cisco
(1)
cluster
(1)
compress
(1)
cssh
(1)
debug
(1)
dedup
(1)
disk
(1)
dl185
(1)
flar
(1)
guest
(1)
hardware clock
(1)
ifconfig
(1)
ldm
(1)
ldom
(1)
live upgrade
(1)
logrotate
(1)
lsof
(1)
ludelete liveupgrade lustatus ICF
(1)
miniroot
(1)
mongrel
(1)
netapp
(1)
network
(1)
nfs
(1)
ntp
(1)
ontap
(1)
parallel
(1)
patching
(1)
pca
(1)
polysh
(1)
rails
(1)
random
(1)
redhat centos rpm fpm
(1)
ruby
(1)
scsi
(1)
sis
(1)
sparc
(1)
switch
(1)
sysstat
(1)
tag
(1)
time
(1)
udev
(1)
untag
(1)
vlan
(1)
xen xe vdi vm vm-start vm-export
(1)
Blog Archive
►
2013
(4)
►
June
(3)
►
January
(1)
►
2012
(1)
►
September
(1)
►
2011
(3)
►
December
(3)
▼
2010
(7)
►
November
(1)
►
October
(1)
►
August
(1)
►
February
(2)
▼
January
(2)
Bash History
How to convert a mac from Cisco/Foundry format to ...
►
2009
(18)
►
July
(6)
►
June
(2)
►
May
(10)
No comments:
Post a Comment