Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!umd5!brl-adm!adm!rbj@ICST-CMR.ARPA From: rbj@ICST-CMR.ARPA (Root Boy Jim) Newsgroups: comp.unix.wizards Subject: Tool -flag considered harmful (was: grep replacement) Message-ID: <16186@brl-adm.ARPA> Date: 15 Jun 88 22:05:54 GMT Sender: news@brl-adm.ARPA Lines: 33 ? From: "Bruce G. Barnett" Everything you said that I deleted I agree with totally. ? If diff loses the -c (context) option, I have to be familiar with ? two commands instead of one. One being diff, one being context diff. ? Why should I have to know about two different commands that do the ? same thing - compare two files? Not only that, but as features are added to one program, they will not be necessarily added to the other. Regression testing of two programs will be more difficult than one. Most likely the two programs will also consume more disk space as well. ? Flame me if you will, but when I use these tools in an interactive ? session, I don't care if 'cat -v' is slow. Or 'diff -c'. Or grep -whatever. 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. Cmp also takes (BSD cmp at least) third and fourth numeric arguments; the offsets within the file to start comparing at. They could be easily figured into the above computation. This would often save a lot of time. ? Bruce G. Barnett ? uunet!steinmetz!barnett (Root Boy) Jim Cottrell National Bureau of Standards Flamer's Hotline: (301) 975-5688 The opinions expressed are solely my own and do not reflect NBS policy or agreement My name is in /usr/dict/words. Is yours?