Is there a way around "Error: Command Line Too long"? I am using a command line software for which I need to input a lot of arguments. Something like

./exec -A argA -B argB -C argC ...


There are so many arguments that I get the error message

Error: Command line too long (302110 &gt;= 130592)


One solution would be to modify the software so that it reads arguments from a file. However, I don't have access to the source code.

Is there a way around this problem?



FYI, I am on Mac OS X 10.11.3 and use Terminal 2.6.1 (361.1)
Put the arguments in a file such as -A argA -B argB -C argC … (excluding the binary), then run:

cat /path/to/file | xargs ./exec