Dear GNU

I found the following command op the internet:
root@localhost # parted -a optimal /dev/sda
(parted) unit mib
(parted) mkpart primary 515 -1

However, when I try to turn it into a part of a script like this:
root@localhost # parted --script /dev/sda mkpart primary 515 -1

Greetings, Sachiel2008