SUMMARY: arg list too long

From: SIMEONE, Allan J. <Allan.SIMEONE_at_rp-rorer.com>
Date: Mon, 06 Jul 1998 10:55:11 -0400

Hello All,

Here is the summary to my "arg list too long" question. I got some
excellent feedback
from many people. Thank you for the replies.

Some people suggested to use xargs while other suggested just splitting
up the
variables that need to be defined in different processes.

I couldn't get xargs to work. What I did was call DEC about this.
Although they
couldn't tell me exactly what the limit was for defining variables, it
was mentioned
it was around 64K as the limit. Basically, DEC said, "it isn't going to
happen" for the
amount of variables I want to define. So, we did the workaround by
splitting up the
variables for each process created. DEC did suggest that I could
install a third party
ksh, but then it wouldn't be supported by DEC. Then it *may* work.

You can test the amount of variables you can set by typing in env |
wc.
If no errors come up, you can add more variables.

I was only able to get up to about 35K before I started running into
problems.

Allan

>----------
>From: SIMEONE, Allan J.
>Sent: Wednesday, July 01, 1998 4:19PM
>To: 'alpha-osf-managers_at_ornl.gov'
>Subject: arg list too long
>
>Hi,
>
>I've checked the archives and saw the question, but haven't really seen
>a fix, so
>I need to ask this again.
>
>I have a file that gets an error if there are more than 28 lines in it.
>Each line in this file
>calls another file that has 54 lines in it. The 54 lines do the
>following for example:
>
>env1=1
>export env1
>env2=2
>export env2
>then 50 more lines of the same...
>
>so divide the 54 lines in 2 and that would be 27 variables and then
>times that by 28 would
>be 756 variables set.
>
>The error I get is "arg list too long". Would the problem be too many
>variables being set
>or too many lines in the file that would exceed 28 lines in it?
>
>Is there a way around this problem. I tried splitting the file up that
>would work with 28 lines
>by making 2 files with 28 lines in it, but that didn't make a
>difference.
>
>Basically, I have tried 2 ways of doing this...
>
>cat $project/file | while read study #file has the >28 lines in it.
>do
>. /usr/local/env_$study #env_$study has the 54 lines in it.
>done
>
>and I have tried...
>
>for study in 'cat $project/file'
>do
>./usr/local/env_$study
>done
>
>thanks,
>Allan
>
Received on Mon Jul 06 1998 - 16:56:05 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:38 NZDT