Using a BASH Script to Automate FDISK in Linux
-
http://www.scottalanmiller.com/linux/2014/06/12/scripting-fdisk/
Fdisk is a huge pain to automate and it is hard to find resources on how to do it. Here it is. Works really well.