Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

export limit in zsh and other shells?



Here at PDI we use a TON of environment variables to control many aspects of
our animation jobs. Just today a user came to me complaining that when he
loaded *all* of these variables into his zsh session he got output like
this:

  % ls
  zsh: arg list too long: ls

I did a little research and have discovered that just about every shell we
have here--sh, bash, csh, tcsh, and zsh--exhibit this behavior when presented
with a couple hundred exported/environment variables. Many of these variables
are strings, by the way, so I suspect this might cause some kind of memory
buffer overrrun. Don't quote me on that, though.

Here's what I used to generate a test file to source:

  (i=0; while [[ ${i} -lt 600 ]] ; do
  echo "foo${i}=\"a nice long string to see what happens ${i}\""
  i=$[i + 1]
  done) >>| /tmp/vartest

--

Nik Gervae < nik at linna dot com >
Writer, coder, vegan, dilettante




Messages sorted by: Reverse Date, Date, Thread, Author