Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!ukma!gatech!ncar!tank!nic.MR.NET!thor!mike From: mike@thor.stolaf.edu (Mike Haertel) Newsgroups: comp.unix.wizards Subject: Re: cat -u Message-ID: <859@thor.stolaf.edu> Date: 12 Dec 88 18:04:55 GMT References: <175@ernie.NECAM.COM> <189@wyn386.UUCP> <8910@smoke.BRL.MIL> <8160@bloom-beacon.MIT.EDU> <146@minya.UUCP> <5077@bsu-cs.UUCP> Reply-To: mike@wheaties.ai.mit.edu Organization: St. Olaf College, Northfield, MN Lines: 29 In article <5077@bsu-cs.UUCP> dhesi@bsu-cs.UUCP (Rahul Dhesi) writes: >By the way, if you took the one-function-per-program philosophy too far, >you would have separate commands such as cc-g, cc-O, cc-ld, cc-E, etc., >instead of having a single front-end called cc that accepts a large >number of switches. Nobody ever said programs should have really only ONE function. But all of a program's options should be related to its main purpose. Cat -v, for example, fails this test, because making nonprinting characters visible has nothing whatever to do with concatenating files. Cat -u is merely cruft. Cat -s is not portable between BSD and System V; on BSD you can replace it with "sed '/^$/d'" and on System V it means about the same as 2>/dev/null. So -s is disposable too. IMHO, cat needs no options. The -g option to compilers, on the other hand, is intimately related to the internals of the compiler, and there is no clean way to make it in a separate program. #ifdef FLAME Just because it is more 'efficient' to combine functionality in one program (is it really? Think of debugging time . . .) doesn't mean you should. Defending something like cat -s? You're nuts. I suppose you want a -t option to cat, to transliterate characters in its output too . . . or maybe a -e option, to expand tabs . . . or . . . #endif -- Mike Haertel mike@wheaties.ai.mit.edu In Hell they run VMS.