home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / wizards / 4752 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  1.5 KB

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