Home Depot and Lowes will custom cut black pipe for you. You only pay for the cost of the pipe. It's a standard service they provide.
Up to 1" you can generally find nipples in lengths of 18", 24", 36", and 48" pre-cut.
Sounds like a fine way to go. It can hold up a lot of weight...