Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!oliveb!sun!gorodish!guy From: guy@gorodish.Sun.COM (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: Tool -flag considered harmful (was: grep replacement) Message-ID: <56810@sun.uucp> Date: 16 Jun 88 17:37:04 GMT References: <16186@brl-adm.ARPA> Sender: news@sun.uucp Lines: 10 > While we're on the subject of efficiency, cmp is coded wrong. It should > first stat the two files to be compared. If the character count is different, > so are the files. And files tend to be different more often than the same. This helps out "cmp -s", but doesn't help the others, of course. > Cmp also takes (BSD cmp at least) third and fourth numeric arguments; > the offsets within the file to start comparing at. They all do - or, at least, the 4BSD and S5"R1" ones do, which makes it likely that the V7 one did (I don't have the source handy to check).