"Douglas Gatchell" <dgg@lanl.gov> writes:
# The lists command has ceased to work for us. I suspect it is the same
# problem that results when we try to ls the directory (ie ls /listdir/*
# results in
# Arguments too long.).
#
# I have looked at the code in majordomo ( while(<${listdir}/*>) { )
# and have determined that this returns a null list.
#
# Is there anyway around this? Is there a finite number of lists that
# majordomo can handle. We curretly have 294 lists and 1725 entries in the
# directory.
There's a limit to how big a directory you can handle with a <...>
construct in perl (the limit isn't actually in perl, it's in sh or
csh, which is what perl uses to expand the <...> constructs).
What you need to do is replace the
while (<${listdir}/*>) {
...
}
with something like:
opendir(DIR, "$listdir") || die("opendir(DIR, \"$listdir\"): $!");
while ($_ = readdir(DIR)) {
...
}
closedir(DIR);
-Brent
--
Brent Chapman | Great Circle Associates | Call or email for info about
Brent@GreatCircle.COM | 1057 West Dana Street | upcoming Internet Security
+1 415 962 0841 | Mountain View, CA 94041 | Firewalls Tutorial dates
|
|