Path: utzoo!attcan!uunet!munnari.oz.au!brolga!lingua.cltr.uq.OZ.AU!root From: root@lingua.cltr.uq.OZ.AU (Hulk Hogan) Newsgroups: comp.arch Subject: Re: UNIX mind-set (was: How wrong is MS-DOS?) Message-ID: <1991Jan14.055453.21780@lingua.cltr.uq.OZ.AU> Date: 14 Jan 91 05:54:53 GMT References: <8148@hub.ucsb.edu> <11313@lanl.gov> Organization: Centre for Language Teaching and Research, Uni of Queensland, AUSTRALIA. Lines: 49 jlg@lanl.gov (Jim Giles) writes: >From article <8148@hub.ucsb.edu>, by tom@bears.ucsb.edu (Tom Weinstein): >> And you've been using UNIX for ten years? The shell does wildcard >> substitution, not ls. You could just as easily type 'echo x*y'. >Yes, you could type 'echo x*y' - which would write the string 'x*y' >on your terminal. The shell does no wildcard substitution on any >argument _automatically_. The tool has to ask for the functionality. One last time. After you hit the RETURN key to terminate your input, the shell parses it. Leaving aside how it handles redirections and pipes, it globs the wildcards (which haven't been quoted) and then executes the specified programs with the globbed arguments. If there are no files matching the specification "x*y", then the result of the glob will be "x*y" in sh/ksh, and an error message in csh/tcsh. So "echo x*y" will print "x*y" in [k]sh, and an error message from [t]csh. Check the difference between entering echo * and echo "*". >Doesn't effect the validity of my previous point any. The use of >'ls x*y' is redundant with 'ls | grep x*y' in contradiction to the >"one tool = one simple function" paradigm. In fact, the paradigm >itself is a fraud. Nearly all UNIX tools have options and arguments >which cause them to do several distinct things. The difference between >that state of affairs and the one I would recommend is that the UNIX >tools each implement a rag-tag assortment of capabilities. What I >recommend is that each tool implement a complete set of closely >related functions in a well thought out way. On the whole, the extra functions are fairly logical, I think. Take the "-u" argument to "sort" which basically does the same as "uniq". Ok, it is unnecessary when you have "uniq", but I'd rather have both. Because I've read the manual, I know I can use "sort -u" and avoid an unnecessary pipe ("sort .... | uniq"). By all means, use the pipe if you want to. No one would deny the "creeping featurism" in Unix. Most people I know find it very very handy. /\ndy -- Andrew M. Jones, Systems Programmer, Internet: andy@lingua.cltr.uq.oz.au Centre for Lang. Teaching & Research, Phone (Australia): (07) 365 6915 University of Queensland, St. Lucia, Phone (World): +61 7 365 6915 Brisbane, Qld. AUSTRALIA 4072 Fax: +61 7 365 7077 "No matter what hits the fan, it's never distributed evenly....."