home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.wizards:4752 comp.unix.shell:4752
- Newsgroups: comp.unix.wizards,comp.unix.shell
- Path: sparky!uunet!sangam!shakti!shobhana
- From: shobhana@shakti.ncst.ernet.in (Shobhana)
- Subject: Re: The Problem with UNIX
- Message-ID: <Bxv4GB.GJA@shakti.ncst.ernet.in>
- Organization: CMIE, Bombay
- References: <1992Nov11.194557.16258@yarc.uucp> <1992Nov13.091914.6799@thunder.mcrcim.mcgill.edu> <1992Nov14.153857.1666@global.hacktic.nl>
- Date: Tue, 17 Nov 1992 13:36:05 GMT
- Lines: 24
-
- In article <1992Nov14.153857.1666@global.hacktic.nl> peter@global.hacktic.nl (Peter Busser) writes:
- >mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
- >
- >> cat a b > b
- >
- >>files? Consider instead "echo a b > b".[%]
- >
- >I did just that with bash and it didn't complain. But yet, echo is often a
- >built-in command. It complained about 'cat a b >b' but didn't complain about
- >'cat a b|cat>b' so it's not perfect.
-
- I haven't followed this thread from the beginning, so if I am
- saying something irrelevant let me know (oh, I'm sure you will ;-)
-
- Anyway, cat's complaint about input and output file being the same
- is produced by cat(1) and *not* by .*sh(1). So what *is* the problem?
-
- I presume that there is a school of thought which says that *sh should
- detect such problems and let you know about it. IMHO, the command
- interpreter *cannot* and should not make such decisions. e.g the name
- of a file means different things to cat(1) and echo(1)---sh(1) has *no*
- way of knowing this and should not even attempt to guess.
-
- Regards
-