[Date Prev][Date Next][Thread Prev][Thread Next]
[Search]
[Date Index]
[Thread Index]
Re: [FWP] Grepping only text files
On Tue, Jun 29, 1999 at 11:33:35AM -0700, Bernie Cosell wrote:
> I can't exactly figure out why [Unix] grep has never had a command
> line switch [if not the default!] only to scan text files. I use the
> following:
>
> exec ("grep" , grep { not -B ; } @ARGV) ;
>
> This is pretty crude with only one redeeming feature [aside from its
> utility!]: the test has to be "not -B" -- "-T" won't do because it
> depends on the [fairly likely?] fact that the numerous and largely
> unparseable command-line options for grep will not collide with the
> names of binary files in the current directory (and at least as a
> practical-perl matter, it works for me).
>
This makes no sense. There is no reason why you could use "not -B", but
could not use "-T".
Ronald
==== Want to unsubscribe from Fun With Perl?
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org