Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!uwm.edu!bionet!hayes.ims.alaska.edu!floyd From: floyd@ims.alaska.edu (Floyd Davidson) Newsgroups: comp.arch Subject: Re: UNIX mind-set (was: How wrong is MS-DOS?) Message-ID: <1991Jan13.113349.21937@ims.alaska.edu> Date: 13 Jan 91 11:33:49 GMT References: <11267@lanl.gov> Organization: University of Alaska, Institute of Marine Science Lines: 75 In article <11267@lanl.gov> jlg@lanl.gov (Jim Giles) writes: > >Someone suggested >alt.humor - an interesting idea, but still probably not approporiate. Considering some of your arguments, very appropiate... But you do make some good points too, so... [...] >Both. But all too often programming _is_ done with pipes, etc.. It hardly seems correct to associate bad programming with a particular OS. At least not without backing it up with some statement about what characteristics of the OS lead to bad programming. It may or may not be true that UNIX encourages bad programming, but you are saying something to the effect that UNIX is bad because it has C compilers available for it and C uses goto's, therefore UNIX is bad. May be, but not for that reason, because it is basically true of all OS's. > >> [...] >> I do *not* want to write a program every time I want to search a file >> for a word. [...] > >Quite so. In my case, well over 90% of such searches are followed by >an edit of the file in the neighborhood of the found word. So - over >90% of such searches I do are from within an editor - which should have [...] >So, the remaining few times I need a grep-like functionality are to >make up for the lack of such a feature in tools like ls. Here is >where I make my once or twice a month use of grep. I should be able >to say something like 'ls -owner jblow' and get a list of all files >in the directory belonging to joe blow. I _could_ write a shell >script to do this (use awk to extract the owner field from an 'ls -l' >sequence, then grep for 'jblow'). What I usually end up doing, though, >is writing 'ls -l | grep jblow' - which has the unfortunate habit >of also listing files whos names contain 'jblow'. Using grep this way >doesn't exemplify the strength of grep - it simply (almost) covers >a weakness in ls. > >A production quality ls would have the capability to filter any >of the fields of a file description in generally useful ways. >For example, what about 'ls -before 1/1/90' to list all files >created before Jan. first 1990? Try to do _that_ with grep. Ooops. You just ran the wrong way for a touchdown. I think you just proved the opposite point! (And suggested that you don't really *know* UNIX all that well, ten years or not.) The advantage of UNIX is that tools are trivial to the point of doing just one basic thing. As a result each user can easily build larger tools to do *anything*. You want *everything* built in (at least everything that you would use) to every program. With UNIX you can build a command (in many different ways) to do just what you desribed above. I don't need it and don't want it. I have my own list of special tools that I built for my use, and you undoubtedly don't need and don't want even one of them. UNIX gives both of us an environment that can be customized to our particular needs. If an OS were build with your critizisms in mind one of us would be very unhappy at best, or we would have one very bloated system. UNIX is arguably somewhat bloated by just giving us every possible trivial tool. Now imagine a system where every tool has every possible trivial option! Floyd PS Why use grep for the 'ls -before 1/1/91' command. There are better ways. Try 'find'. (You may want to grep the output.) -- Floyd L. Davidson floyd@ims.alaska.edu Salcha, AK 99714 paycheck connection to Alascom, Inc. When I speak for them, one of us will be *out* of business in a hurry.