Date: Tue, 06 Aug 1996 13:53:14 -0700 From: Scott Blachowicz <scott@statsci.com> To: Nate Williams <nate@mt.sri.com> Cc: Brian Clapper <bmc@telebase.com>, questions@freebsd.org Subject: Re: ``tgrep'' from Unix Power Tools Message-ID: <m0unt7r-000QYIC@main.statsci.com> In-Reply-To: Your message of "Tue, 06 Aug 1996 12:35:57 -0600." <199608061835.MAA28375@rocky.mt.sri.com> References: <199608061813.OAA08918@telebase.com.> <199608061835.MAA28375@rocky.mt.sri.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Nate Williams <nate@mt.sri.com> wrote:
> That's because those test requires the STDIO package that is used in
> the original Unix, which was re-implemented by Chris Torke in 4.4BSD.
> If you feel ambitious you could re-write the test using the internals of
> the BSD stdio. See perl/perl/doio.c, and look for 'STDSTDIO'.
Or the 'tgrep' script could be changed a little so as not to need the
-T/-B file test operators. I've got a script (called 'rgrep') that I
pulled from the net a long time ago that had the same problem. It's
header comments go like this (in case it's an ancestor of your tgrep
script):
# @(#)rgrep version 3.4 created 5/19/93
...
# Written by Piet van Oostrum <piet@cs.ruu.nl>
# This is really free software
The way I worked around the problem was to have the code that cycles thru
reading a file treat as binary any file containing a '\000' character
(which I would expect to be a fairly common thing for a binary file and
not for a text file). I could email/post my modified rgrep script for
anyone who's interested.
Scott Blachowicz Ph: 206/283-8802x240 Mathsoft (Data Analysis Products Div)
1700 Westlake Ave N #500
scott@statsci.com Seattle, WA USA 98109
Scott.Blachowicz@seaslug.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0unt7r-000QYIC>
