Created
March 10, 2020 15:46
-
-
Save SalemHarrache/181e8ae01616fb43e54911b506087c57 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
hexdump -n 6 -ve '1/1 "%.2x "' /dev/random |\ | |
awk -v a="2,6,a,e" -v r="$RANDOM" ' | |
BEGIN { | |
srand(r); | |
} | |
NR==1 { | |
split(a, b, ","); | |
r=int(rand() * 4 + 1); | |
printf("%s%s:%s:%s:%s:%s:%s\n", substr($1, 0, 1), b[r], $2, $3, $4, $5, $6); | |
} | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment