1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Mac="00:00:00:00:00:01"
num=1000
mac6=$(echo $Mac| awk -F':' '{print $6}')
((mac6=16#$mac6))
mac5=$(echo $Mac| awk -F':' '{print $5}')
((mac5=16#$mac5))
num=$((num - 1))
for i in $(seq $num); do
mac6=$((mac6+1))
if (( $mac6 > 255 )) ; then
mac5=$((mac5+1))
mac6=$((mac6-256))
fi
mac6tmp=$(printf %02x $mac6)
mac5tmp=$(printf %02x $mac5)
macTmp=${Mac:0:12}$mac5tmp:$mac6tmp
echo $macTmp
阅读(1395) | 评论(0) | 转发(0) |