Asked Oct 18th, 2017 9:45 AM 97 0 1
  • 97 0 1
+1

Cần giúp batch script

Share
  • 97 0 1

A chị nào giúp e dịch code trên linux này sang batch script để e dùng trên window với, e cảm ơn

#!/bin/bash
IF=eth0

# Create a Random MAC
# MAC might not be valid since it's completely random. Use the linked answer to add a prefix like 00:60:2F
hexchars="0123456789ABCDEF"
MAC=$(for i in {1..12} ; do echo -n ${hexchars:$(( $RANDOM % 16 )):1} ; done | sed -e 's/\(..\)/\1:/g;s/:$//')

ip link set dev $IF down
ip link set dev $IF address $MAC
ip link set dev $IF up

1 ANSWERS


Answered Oct 19th, 2017 1:07 AM
Accepted
0

Có ai pro giúp với e cám ơn

Share