home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / wizards / 4653 < prev    next >
Encoding:
Internet Message Format  |  1992-11-13  |  3.9 KB

  1. Xref: sparky comp.unix.wizards:4653 comp.unix.shell:4674 comp.unix.misc:4140
  2. Newsgroups: comp.unix.wizards,comp.unix.shell,comp.unix.misc
  3. Path: sparky!uunet!utcsri!newsflash.concordia.ca!sifon!thunder.mcrcim.mcgill.edu!mouse
  4. From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
  5. Subject: Re: The Problem with UNIX
  6. Message-ID: <1992Nov13.091914.6799@thunder.mcrcim.mcgill.edu>
  7. Followup-To: comp.unix.wizards,comp.unix.shell
  8. Organization: McGill Research Centre for Intelligent Machines
  9. References: <1992Nov9.172715.16367@cs.wisc.edu> <1992Nov11.194557.16258@yarc.uucp>
  10. Date: Fri, 13 Nov 92 09:19:14 GMT
  11. Lines: 77
  12.  
  13. [ I am removing comp.unix.misc from followups.  It's posted to two
  14.   other comp.unix.* groups; comp.unix.misc is inappropriate. ]
  15.  
  16. In article <1992Nov11.194557.16258@yarc.uucp>, scott@yarc.uucp (Scott Beckstead) writes:
  17. > In article <aldavi01.721333614@starbase.spd.louisville.edu> Arlie Davis <aldavi01@starbase.spd.louisville.edu> writes:
  18. [stuff we've all seen plenty of times already]
  19.  
  20. > I agree an experienced user should be able to recognize and avoid the
  21. > problems above.  What's wrong with the shell catching such obvious
  22. > errors and either reporting them or taking other appropriate action
  23. > (ie correcting them).
  24.  
  25. (Is that an unfinished sentence, or a question with no question mark?
  26. Given context, I'll assume the latter.)  What's wrong with it?  First
  27. of all, it's impossible.  Specifically,
  28.  
  29.     cat a b > b
  30.  
  31. How is the shell supposed to know that cat is going to interpret its
  32. arguments as filenames, and what's more, output the contents of those
  33. files?  Consider instead "echo a b > b".[%]
  34.  
  35.     rm -filename
  36.  
  37. How is the shell supposed to know whether the user intended that
  38. argument as a filename to remove or an option to rm?  In at least some
  39. cases (eg, -i) only the user knows.
  40.  
  41.     mail someone < a.out
  42.  
  43. How is the shell supposed to know that mail takes only printable text?
  44. It can't.  Perhaps this version of mail is a new whizbang mailer in
  45. test that does take binary files....
  46.  
  47. In all of these cases, the shell has to know quite a lot about the
  48. semantics of the program being run.  It cannot know all about every
  49. program, and I submit that partially protecting users from themselves
  50. is worse than not doing it at all.
  51.  
  52. Besides all that, these aren't always mistakes.  I once wanted to fill
  53. up a filesystem in a hurry, so I copied /vmunix to foo and then did
  54. "cat foo >> foo".  I was *extremely* annoyed when cat said something
  55. along the lines of "input foo is output" and refused to run.  I had to
  56. waste a pipe and do "cat foo | cat >> foo", and then realized that the
  57. extra copies involved in the pipe were slowing down the operation and
  58. switched to using dd, which mercifully had not been broken by some
  59. overzealous fool trying to keep people from shooting themselves in the
  60. foot.
  61.  
  62. > I realize that this will get me screamed at by all you guru types
  63. > that advocate that all shell users be rocket scientists or why bother
  64. > using a computer anyway.
  65.  
  66. I don't see what rockets have to do with it.  *deadpan look*
  67.  
  68. No, you misunderstand.  Not "why bother using a computer anyway" but
  69. "why use a system which wasn't designed for you and isn't suited to
  70. you".  UNIX was built by hackers for hackers, and hackers seem to like
  71. it just fine.  If you don't like it, by all means, don't use it.
  72.  
  73. > However I see no reason NOT to research the subject.  If UNIX could
  74. > be made more user friendly by modifying the shell it might gain more
  75. > acceptance in the general microcomputer market place, GUIs not
  76. > withstanding.
  77.  
  78. Yes, it might.  So what?  Is "acceptance in the general microcomputer
  79. market place" something we wish for UNIX?  If it means dumbing down the
  80. interface until people no longer have enough rope to hang themselves,
  81. well, you can if you want, but I'll keep using what I've got.
  82.  
  83. [%] Yes, I know there are shells with echo built in.  The point I'm
  84.     trying to make is still valid.
  85.  
  86.                     der Mouse
  87.  
  88.                 mouse@larry.mcrcim.mcgill.edu
  89.