As Matthias Weißer wrote:
AVRDUDE should be able to read a scriptfile with the same commands
as in terminal mode:
-t without parameter: enter terminal mode
-t "filename": execute the commands in the file and exit
That violates the option style guidelines for Unix programs (*), and
is not supported by the standard getopt(3) library function. It can
only accept options that either always require an argument, or never.
Proposal: -T filename
(*) I know other programs violate them, too. But that's no reason to
follow bad practice, and in particular no reason to give up on using
standard getopt(), and roll our own...