Path: utzoo!utgpu!water!watmath!clyde!att!rutgers!bellcore!faline!thumper!ulysses!andante!alice!andrew
From: andrew@alice.UUCP
Newsgroups: comp.unix.wizards
Subject: Re: "dd conv=unblock cbs=80 - really grep replacement"
Summary: grepping non-text files
Keywords: grep replacement
Message-ID: <8024@alice.UUCP>
Date: 5 Jul 88 09:11:48 GMT
References: <144@insyte.UUCP> <3350@phri.UUCP> <8168@ncoast.UUCP> <58590@sun.uucp>
Organization: AT&T Bell Laboratories, Murray Hill NJ
Lines: 13



the job of grep is to search text files which have a conventional
structure of \n terminated lines (note current greps may or may not
print matching last lines without a trailing \n). what should grep
do when it finds no such newline within shouting distance of a match?
obviously (to me) it should complain about line too long. but
can it produce useful output? in general, yes. my feeling is that it
should print some window around the match (say 256? bytes) so that
users can use the -b (hopefully meaning byte offset) to find out where
the match really is. this way, normal input is not affected (either
semantically or performance) and people with non-newline (BUT text)
input can put together a script to do what they want.