What is the maximum length of a command line in Mac OS X?

The limit is not in bash but in your operating system. It's defined by the value of ARG_MAX in your OS's limits.h. You can get the value by running getconf ARG_MAX. On my OSX 10.5 machine (and most other BSD systems) it's 262144. You can read more about this limit here.


It depends on the shell, but the last time I ran a configure script using zsh on 10.6 it was 65535 characters.