RE: grep argument list too long...how to get around it?

From: Alexandru Colea (acolea_at_yahoo.com)
Date: 10/10/03


To: "'Steve Grazzini'" <grazz@pobox.com>,	"'Kevin Old'" <kold@kold.homelinux.com>
Date: Fri, 10 Oct 2003 13:17:18 -0400

You can put arguments in a file and then open and parse the file inside
perl.

-Alex C.

-----Original Message-----
From: Steve Grazzini [mailto:grazz@pobox.com]
Sent: Friday, October 10, 2003 12:29 PM
To: Kevin Old
Cc: Dan Muey; beginners@perl.org
Subject: Re: grep argument list too long...how to get around it?

On Fri, Oct 10, 2003 at 12:37:02PM -0400, Kevin Old wrote:
> On Fri, 2003-10-10 at 11:46, Steve Grazzini wrote:
> > No. (It's ARG_MAX...)
>
> I'm running Mandrake 9.0 and my ARG_MAX is not set, so is it
> "unlimited"? If not, what is the default?

It's not an environment variable. (Check limits.h.)

And remember, that's not the *number* of files/arguments/whatever.
ARG_MAX is the total *memory* that can be used for a new process's
environment and argument list.

    % export FOO=$( perl -le 'print "x" x 2**17' )
    % ls
    bash: /bin/ls: Argument list too long

-- 
Steve
-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org


Relevant Pages

  • RE: Timing several processes
    ... To clarify, I found the following in "Learning Perl". ... to parse the data I will generate, ... To unsubscribe, e-mail: beginners-unsubscribe@perl.org ...
    (perl.beginners)
  • capturing a match
    ... Below is a grepped list of data I want to parse in Perl. ... initially going to be done on a one-liner hence why grep was ...
    (comp.lang.perl.misc)
  • Re: is it possible to install a desktop-manager without python and perl?
    ... There are wonderful pre-written Perl modules to ... parse and output XML. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Fun with grep
    ... I'm trying to parse a file, ... Is this possible with grep? ... perl would be easier because it has a range operator. ...
    (uk.comp.sys.mac)
  • Re: cmdline tool to search through pdf files?
    ... like grep and perl. ... But I never heard about PDF being compressed. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)