Oops. And a brainteaser. Re: The Hosstraders retire

Kevin D. Clark kclark at elbrysnetworks.com
Tue Feb 20 10:46:01 EST 2007


Bill Sconce writes:

> Before I posted I looked to see if anyone had already done so... 
> I searched my GNHLUG folder (mh!) for earlier posts on the subject.
> Since each message is a file in mh-land, this command:
>     grep -in "hosstrad" ~/Mail/...gnhlug.x/* | less
> yields one line from each of the files (messages, headers included)
> which have "Hosstraders" in them.  I got a lot of hits, of course.
> A LOT. of hits.  My current gnhlug folder goes back to March 2005...

...

> Ah.  But.  Does any skillful grepper see what I did wrong?  I'll
> buy coffee at Martha's (or Uno's, or ABI) for the first correct
> answer...

Another thing that you might want to consider is that the grep command
that you present could die in a mysterious way -- you might have too
much mail in a given folder, and thus you might have too many
arguments to fit on the command line:



          $ getconf ARG_MAX
          131072
          $ /bin/echo `perl -e 'print "a " while ($_++ < 131072)'`
          -bash: /bin/echo: Argument list too long

I only mention this because on some mail systems that I have
maintained (Maildir based) I have run up against this system limit.
This is where I usually run up against this limit, in fact.

The number of arguments that you can pass to a program (for example,
grep) is finite.  Also know that getconf(ARG_MAX) is a byte-count and
not an argument count.

Regards,

--kevin
-- 
GnuPG ID: B280F24E              Never could stand that dog.
alumni.unh.edu!kdc                   -- Tom Waits



More information about the gnhlug-discuss mailing list