When marking off several measurements of the same size, it's best to make yourself a guide. We call this a story pole. When drilling holes for shelf brackets, use an awl to make the pilot holes, then repeat the process by moving the story pole to the opposite edge. This will perfectly align both rows of holes. Now you're ready to drill all the holes uniformly to receive the brackets.
For more on woodworking, consider:
The Essential Toolbox
Radio: Tape Measure
7 Essential Measuring Tools for Any Job