regular expression for MAC address validation

backticks are also viable.

# result=$( echo 00:60:08:C4:99:12 | sed -n "/^\([0-9A-Z][0-9A-Z]:\)\{5\}[0-9A-Z][0-9A-Z]$/p" )
# echo $result
00:60:08:C4:99:12
# result=`echo 00:60:08:C4:99:12 | sed -n "/^\([0-9A-Z][0-9A-Z]:\)\{5\}[0-9A-Z][0-9A-Z]$/p"`
# echo $result
00:60:08:C4:99:12

With bash, I use the following regexp:

egrep "^([0-9a-fA-F]{2}\:){5}[0-9a-fA-F]{2}$"

It's simpler than the one below and accepts capital letters as well.