Table of Contents

Generating MAC Addresses

printf "%s:%s:%s:%s:%s:%s\n" `jot -r -w "%02x" 6 0 99`

Print Sequences of Numbers

Input:

jot - 1000 10000 1000

Output:

1000
2000
3000
4000
5000
6000
7000
8000
9000
10000

Generate Unique Equal-Length Random Numbers

To generate 1000 unique random numbers, issue:

jot -r 1000 0 65535 | uniq | xargs printf "%05d\n"

where the jot parameters mean:

The uniq command eliminates any duplicate random numbers. After that the barges command is used to pass the numbers to printf as parameter. The printf command then takes %05d\n as the formatting parameter meaning to print a 5-digit number all the time (for example, if jot generates the number 1, then printf makes sure to pre-pend zeros to obtain 0001.