home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!think.com!barmar
- From: barmar@think.com (Barry Margolin)
- Newsgroups: comp.unix.questions
- Subject: Re: cat a > a , getting it straight
- Date: 17 Dec 1992 06:45:16 GMT
- Organization: Thinking Machines Corporation, Cambridge MA, USA
- Lines: 12
- Message-ID: <1gp7lsINNlok@early-bird.think.com>
- References: <1992Dec17.020805.28043@news.acns.nwu.edu>
- NNTP-Posting-Host: gandalf.think.com
-
- In article <1992Dec17.020805.28043@news.acns.nwu.edu> navarra@casbah.acns.nwu.edu (John Navarra) writes:
- >Why does appending a to a with cat not work but wc a >> a does produce
- >the output from wc that is expected?
-
- Because cat checks whether the input and output are the same file. When
- this is so, it prints the warning message and exits. Wc (and most other
- programs) doesn't check, so the expected thing happens.
- --
- Barry Margolin
- System Manager, Thinking Machines Corp.
-
- barmar@think.com {uunet,harvard}!think!barmar
-