home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!know!mips2!news.bbn.com!noc.near.net!nic.umass.edu!news.mtholyoke.edu!news.byu.edu!hamblin.math.byu.edu!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!uwm.edu!daffy!uwvax!brownie.cs.wisc.edu!so
- From: so@brownie.cs.wisc.edu (Bryan S. So)
- Newsgroups: comp.unix.wizards
- Subject: Re: The Problem with UNIX
- Message-ID: <1992Nov12.231845.14014@cs.wisc.edu>
- Date: 12 Nov 92 23:18:45 GMT
- References: <96927@netnews.upenn.edu> <1992Nov11.210729.11676@cs.wisc.edu> <BARNETT.92Nov12092045@grymoire.crd.ge.com>
- Sender: news@cs.wisc.edu (The News)
- Organization: University of Wisconsin, Madison -- Computer Sciences Dept.
- Lines: 34
-
- Concerning "cat a b > b", barnett@crdgw1.ge.com writes:
-
- >It has been solved. There are at least two solutions:
- > 1) Educate the user. After all the system did exactly what
- > the user told it to do.
- > 2) in csh/tcsh, do "set noclobber"
- >
- >grymoire% set noclobber
- >grymoire% touch a b
- >grymoire% cat a b >b
- >b: File exists.
- >--
- >Bruce Barnett <barnett@crd.ge.com> uunet!crdgw1!barnett
-
- No, the above are not solutions.
-
- 1. We should assume some stubborn users cannot be educated. I
- claim without proof such users exist.
-
- 2. set noclobber is not a solution because a solution should
- prepend a to b.
-
- I propose a real solution to this problem. Change the internal
- policy of UNIX, so that when any file is used as both input and
- output, like
-
- cat a b > a
- or cat a b > b
-
- UNIX should read and buffer all input before opening the output
- with "w".
-
-
- Bryan
-