* Re: grep command
1999-10-12 4:00 grep command John Allen
@ 1999-10-12 4:00 ` Mike Fagan
1999-10-13 4:00 ` Ben Smithurst
1999-10-12 4:00 ` Barry Margolin
1 sibling, 1 reply; 5+ messages in thread
From: Mike Fagan @ 1999-10-12 4:00 UTC (permalink / raw)
John Allen <john.allen@geonet-tech.com> wrote in message
news:3803772b.5152184@192.9.200.16...
> Hi:
>
> I use the -f qualifier in grep alot. It allows you to use a list to
> grep for expressions in a file(s). Eg,
>
> grep -f list.dat file.dat
>
> I'm finding with my DEC(COMPAQ) V4.0e version of unix that the -f list
> file is limited to 400 records; otherwise, if that is exceeded, you
> get a 'list too large' message.
>
> Is there anything which I can set to enlarge that 400 threshold; or,
> is there a workaround?
This is a problem we had to work on with our DNS server that has more than
6000 files that we often have to search through to find information. Try
something along the lines of this:
ls * | xargs grep <searchdata>
I may not have the exact command right - do a man on xargs for more
information.
Mike
^ permalink raw reply [flat|nested] 5+ messages in thread
* grep command
@ 1999-10-12 4:00 John Allen
1999-10-12 4:00 ` Mike Fagan
1999-10-12 4:00 ` Barry Margolin
0 siblings, 2 replies; 5+ messages in thread
From: John Allen @ 1999-10-12 4:00 UTC (permalink / raw)
Hi:
I use the -f qualifier in grep alot. It allows you to use a list to
grep for expressions in a file(s). Eg,
grep -f list.dat file.dat
I'm finding with my DEC(COMPAQ) V4.0e version of unix that the -f list
file is limited to 400 records; otherwise, if that is exceeded, you
get a 'list too large' message.
Is there anything which I can set to enlarge that 400 threshold; or,
is there a workaround?
Thanks,
John L. Allen
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: grep command
1999-10-12 4:00 grep command John Allen
1999-10-12 4:00 ` Mike Fagan
@ 1999-10-12 4:00 ` Barry Margolin
1999-10-12 4:00 ` Alain Magloire
1 sibling, 1 reply; 5+ messages in thread
From: Barry Margolin @ 1999-10-12 4:00 UTC (permalink / raw)
In article <3803772b.5152184@192.9.200.16>,
John Allen <john.allen@geonet-tech.com> wrote:
>Hi:
>
>I use the -f qualifier in grep alot. It allows you to use a list to
>grep for expressions in a file(s). Eg,
>
>grep -f list.dat file.dat
>
>I'm finding with my DEC(COMPAQ) V4.0e version of unix that the -f list
>file is limited to 400 records; otherwise, if that is exceeded, you
>get a 'list too large' message.
>
>Is there anything which I can set to enlarge that 400 threshold; or,
>is there a workaround?
Does the file contain regular expressions, or just fixed strings? If
they're just fixed strings, try fgrep instead of grep; it may not have as
small a limit. If it does, install GNU fgrep; I just tried it with 10,000
records and it worked. However, GNU grep and egrep both complained
"Regular expression too big".
--
Barry Margolin, barmar@bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: grep command
1999-10-12 4:00 ` Barry Margolin
@ 1999-10-12 4:00 ` Alain Magloire
0 siblings, 0 replies; 5+ messages in thread
From: Alain Magloire @ 1999-10-12 4:00 UTC (permalink / raw)
Barry Margolin (barmar@bbnplanet.com) wrote:
: In article <3803772b.5152184@192.9.200.16>,
: John Allen <john.allen@geonet-tech.com> wrote:
: >Hi:
: >
: >I use the -f qualifier in grep alot. It allows you to use a list to
: >grep for expressions in a file(s). Eg,
: >
: >grep -f list.dat file.dat
: >
: >I'm finding with my DEC(COMPAQ) V4.0e version of unix that the -f list
: >file is limited to 400 records; otherwise, if that is exceeded, you
: >get a 'list too large' message.
: >
: >Is there anything which I can set to enlarge that 400 threshold; or,
: >is there a workaround?
: Does the file contain regular expressions, or just fixed strings? If
: they're just fixed strings, try fgrep instead of grep; it may not have as
: small a limit. If it does, install GNU fgrep; I just tried it with 10,000
: records and it worked. However, GNU grep and egrep both complained
: "Regular expression too big".
Ha! yes, this comes from GNU regex.c, if you want a bigger buffer you'd have
to change the "# define MAX_BUF_SIZE" to something bigger and recompile.
grep -F does not use the regular expression of GNU regex, so
you should be ok.
--
au revoir, alain
----
Aussi haut que l'on soit assis, on est toujours assis que sur son cul !!!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: grep command
1999-10-12 4:00 ` Mike Fagan
@ 1999-10-13 4:00 ` Ben Smithurst
0 siblings, 0 replies; 5+ messages in thread
From: Ben Smithurst @ 1999-10-13 4:00 UTC (permalink / raw)
Mike Fagan wrote:
> John Allen <john.allen@geonet-tech.com> wrote in message
> news:3803772b.5152184@192.9.200.16...
>
>> I use the -f qualifier in grep alot. It allows you to use a list to
>> grep for expressions in a file(s). Eg,
>>
>> grep -f list.dat file.dat
>>
>> I'm finding with my DEC(COMPAQ) V4.0e version of unix that the -f list
>> file is limited to 400 records; otherwise, if that is exceeded, you
>> get a 'list too large' message.
>>
>> Is there anything which I can set to enlarge that 400 threshold; or,
>> is there a workaround?
>
> This is a problem we had to work on with our DNS server that has more than
> 6000 files that we often have to search through to find information. Try
> something along the lines of this:
>
> ls * | xargs grep <searchdata>
>
> I may not have the exact command right - do a man on xargs for more
> information.
I think you misunderstood. John, if I'm understanding correctly, wants
to use a lot of regular expressions contained in list.dat on just one or
a few files. Your solution is the reverse -- a single regex on a lot of
files (if I'm understanding you correctly).
--
Ben Smithurst | PGP: 0x99392F7D
ben@scientia.demon.co.uk | key available from keyservers and
| ben+pgp@scientia.demon.co.uk
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1999-10-13 4:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-10-12 4:00 grep command John Allen
1999-10-12 4:00 ` Mike Fagan
1999-10-13 4:00 ` Ben Smithurst
1999-10-12 4:00 ` Barry Margolin
1999-10-12 4:00 ` Alain Magloire
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox