[blockquote]diskutil partitionDisk /dev/disk1 2 APM JHFS+ abc 480M JHFS+ 'def ghi' R[/blockquote]

The trick is to use variables to make the process flexible. Put a little of this in the script:

d2="def ghi"

now try to use $d2 in that command, to specify the name of the second volume. My script builds up the command because it's dealing with a dozen partitions, so it looks something like:

diskutil partitionDisk /dev/disk${devnum} APM ${partlist}

Which only works if the partition names do not contain spaces. Quoting ${partlist} doesn't help. Escaping things in partlist didn't work either, but I may not have been trying what was necessary.


I work for the Department of Redundancy Department