home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.wizards:4820 comp.unix.shell:4824 comp.unix.misc:4277
- Newsgroups: comp.unix.wizards,comp.unix.shell,comp.unix.misc
- Path: sparky!uunet!munnari.oz.au!uniwa!DIALix!metapro!bernie
- From: bernie@metapro.DIALix.oz.au (Bernd Felsche)
- Subject: Re: The Problem with UNIX
- Message-ID: <1992Nov20.025401.29861@metapro.DIALix.oz.au>
- Organization: MetaPro Systems, Perth, Western Australia
- References: <1992Nov9.172715.16367@cs.wisc.edu> <aldavi01.721333614@starbase.spd.louisville.edu> <1992Nov13.094336.2341@aber.ac.uk> <id.SY1V.ITA@ferranti.com>
- Date: Fri, 20 Nov 92 02:54:01 GMT
- Lines: 32
-
- In <id.SY1V.ITA@ferranti.com> peter@ferranti.com (peter da silva) writes:
-
- >In article <1992Nov13.094336.2341@aber.ac.uk>
- > btk@aber.ac.uk (Ben Ketteridge) writes:
- >> For example, just to take the 'cat a b > b' problem, you are suggesting IMHO
- >> that the shell shouldn't check redirection of output against the input
- >> and warn the user in this case.
-
- >How does the shell know that the "b" argument to cat is the same as the "b"
- >output file? Because the file exists?
-
- >touch b a
- >cat a b > b
- >b: File exists.
-
- >What's your problem?
-
- [ maybe I misunderstand your followup, but ]
- But isn't it too late when cat starts. "b" has already been truncated.
-
- The "problem" is not in the arguments to a command; that'd
- be ludicrous to parse and interpret, but rather in the
- redirection to existing files. Some shells do incorporate
- "noclobber" options so that a deliberate overwrite has to be
- indicated using "!" after the redirection symbol. It's
- interesting to note that those shells actually _need_
- command history editing because of human factors!
- --
- +-----+ Bernd Felsche _--_|\ #include <std/disclaimer.h>
- | | | | MetaPro Systems Pty Ltd / \ bernie@metapro.DIALix.oz.au
- | | | | 328 Albany Highway, X_.--._/ Fax: +61 9 472 3337
- |m|p|s| Victoria Park, Western Australia 6100 v Phone: +61 9 362 9355
-