home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / wizards / 4664 < prev    next >
Encoding:
Text File  |  1992-11-14  |  2.5 KB  |  70 lines

  1. Newsgroups: comp.unix.wizards
  2. Path: sparky!uunet!ferkel.ucsb.edu!taco!gatech!darwin.sura.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsk!cbnewsj!dwex
  3. From: dwex@cbnewsj.cb.att.com (david.e.wexelblat)
  4. Subject: Re: The Problem with UNIX
  5. Organization: AT&T
  6. Date: Fri, 13 Nov 1992 17:48:47 GMT
  7. Message-ID: <1992Nov13.174847.3882@cbnewsj.cb.att.com>
  8. References: <1992Nov11.210729.11676@cs.wisc.edu> <BARNETT.92Nov12092045@grymoire.crd.ge.com> <1992Nov12.231845.14014@cs.wisc.edu>
  9. Lines: 59
  10.  
  11. In article <1992Nov12.231845.14014@cs.wisc.edu> so@brownie.cs.wisc.edu (Bryan S. So) writes:
  12. > Concerning "cat a b > b", barnett@crdgw1.ge.com writes:
  13. >  
  14. > >It has been solved. There are at least two solutions:
  15. > >    1) Educate the user. After all the system did exactly what
  16. > >        the user told it to do.
  17. > >    2) in csh/tcsh, do "set noclobber"
  18. > >
  19. > >grymoire% set noclobber
  20. > >grymoire% touch a b
  21. > >grymoire% cat a b >b
  22. > >b: File exists.
  23. > >--
  24. > >Bruce Barnett <barnett@crd.ge.com> uunet!crdgw1!barnett
  25. > No, the above are not solutions.  
  26. > 1. We should assume some stubborn users cannot be educated.  I
  27. >    claim without proof such users exist.
  28. > 2. set noclobber is not a solution because a solution should
  29. >    prepend a to b.  
  30. > I propose a real solution to this problem.  Change the internal
  31. > policy of UNIX, so that when any file is used as both input and
  32. > output, like
  33. >     cat a b > a
  34. > or     cat a b > b
  35. > UNIX should read and buffer all input before opening the output
  36. > with "w".
  37. > Bryan
  38.  
  39. Get real.  In your example, replace /bin/cat with /bin/echo:
  40.  
  41.     /bin/echo a b > b
  42.  
  43. What should "unix" do here?  You are confusing the OS, the shell, and
  44. the program.  The various responsibilities are distributed.  Cripe - 
  45. MS-DOG has redirection, and will do the same screwup for commands that
  46. are not built into COMMAND.COM.  I doubt that JCL protects you either.
  47.  
  48. Or would you rather have no I/O redirection, and force all the programs
  49. to do all the I/O themselves?  How would you handle pipelines?
  50.  
  51. As soon as you try to protect users from themselves, you destroy
  52. the usefulness of the system.  Who ever said that Unix is supposed to
  53. be the "One True OS" (other than USL :->)?  Don't destroy the usefulness
  54. of my OS because people who shouldn't be using it are involved.
  55.  
  56. --
  57. David Wexelblat <dwex@mtgzfs3.att.com>  (908) 957-5871
  58. AT&T Bell Laboratories, 200 Laurel Ave - 4B-421, Middletown, NJ  07748
  59.  
  60. "The meaning of life?  That's simple.  Try to be happy, try not to hurt
  61.  other people, and hope to fall in love."  -- Mallory Keaton
  62.