BASH Script PartitionDisks.sh
#!/bin/bash
# User Vars
aDeviceLetters=(b c d e f g h i j)
# Functions #################################
PartDisks() {
pDevice=$1
printf "Partitioning: /dev/sd$pDevice \n"
fdisk /dev/sd$pDevice <<EEOF
n
p
1
w
EEOF
}
# Process #############################
# Confirmation
clear
printf "About to create partitions for configured devices. \n\n"
read -p "Press [Enter] to continue.";
for d in ${aDeviceLetters[@]}
do
PartDisks $d
done
printf "*** Process Ended ***\n"
exit 0
Make blank spaces in HERE variable ENTER (CrLf) etc..
QC Partitions Afterward
fdisk -l