arg list too long

From: SIMEONE, Allan J. <Allan.SIMEONE_at_rp-rorer.com>
Date: Wed, 01 Jul 1998 16:19:59 -0400

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 Wed Jul 01 1998 - 22:26:04 NZST

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