Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!genrad!mit-eddie!godot!harvard!seismo!brl-tgr!tgr!cottrell@nbs-vms.ARPA From: cottrell@nbs-vms.ARPA Newsgroups: net.unix-wizards Subject: The Visible Cat Message-ID: <8794@brl-tgr.ARPA> Date: Thu, 28-Feb-85 18:32:57 EST Article-I.D.: brl-tgr.8794 Posted: Thu Feb 28 18:32:57 1985 Date-Received: Mon, 4-Mar-85 05:43:19 EST Sender: news@brl-tgr.ARPA Lines: 62 > What kind of thinking? The notion that the availability of N options > in "cat" is what makes 4.2BSD great? Sorry, 'taint so. A simple > linenumbering utility ("simple" here excludes "nl" - does anybody actually > use all the subsubsubsubsection stuff there?) does the job of "cat -n" > quite nicely, and a simple visual display utility does the job of "cat -v" > equally well. Putting both those functions into "cat" makes as much sense > as putting file copying, file deleting, file renaming, directory listing, > etc., etc. into a program named, for the sake of argument, "PIP". > > Besides, System V has, unfortunately, picked up "cat -v". > > Guy Harris > {seismo,ihnp4,allegra}!rlgvax!guy I am referring to the extreme notion that if cat is to retain its pedigree as a `pure unix tool' that it must have no other funxion but the simple concatenation of files. This is the Moral Equivalent Of War! (MEOW :-) Why was the notion of options invented? To do the same thing just a little bit differently. That's what I want to do. Let's say I want to look at some mostly-printable but slightly- infected-by-control-character ascii files, number please. I do cat -nv file. Doing it your way would require: cat file | num | vis This loads three programs and runs the data thru two pipes. Yuk! From the user's point of view, `cat' is what the user types to type his file. Let's get User Friendly (user friendly), I wanna get... This poor guy would like to type `type file...'. I realize this is `just a special case' but it's the most common usage for most users. Axually, tho, you are right, but not for the reasons stated by you or even DMR. Having thought about it, I realize there is a better way. In its pure form, cat can use read's & write's. No need to look at every char. The -v option belongs in `pr', which is already a formatting program. It already does -n. Recondition ourselves to use pr instead of cat. However, the default should be to always make funny chars visible, and use -v to output verbatim. Pr is mostly used to send things to the printer, which barfs at control chars anyway. Saying things like putting in features just makes the manual thicker does not communicate your reasoning to someone who likes a particular feature. As I said, we can get rid of `cp' by using `catto'. However, if one is going to argue against a specific implementation of a feature, one must be prepared to offer it somewhere else. My SYS V (Motorola port, V.0) has no cat -v. It has no pg either. TPC dragged their feet on any kind of screen editor and still does not have csh or the multicolumn ls that DMR railed against. It was instructive to read his thoughts on multicolumn filters and in fact I wrote /bin/lm that contains the line `ls $* | pr -at5'. While I can see that features for features sake is cancerous, lack of funxionality is annoying, user hostile, and just plain boring. Joe Random Hacker (he's back, folx!) wants to see his files in a pretty-printed format, he doesn't care that the ouput can be piped to grep or sed in a one-file-per line format. Tools should serve their masters. "Use your mentality, wake up to reality" jim */