home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / bugs / 4bsd / 240 < prev    next >
Encoding:
Text File  |  1992-12-18  |  1.7 KB  |  43 lines

  1. Newsgroups: comp.bugs.4bsd
  2. Path: sparky!uunet!spool.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!menudo.uh.edu!sugar!ficc!peter
  3. From: peter@ferranti.com (peter da silva)
  4. Subject: Re: A serious bug in unix2dos/dos2unix
  5. Message-ID: <id.87XV.OQH@ferranti.com>
  6. Organization: Xenix Support, FICC
  7. References: <1992Dec12.224109.15621@cs.mcgill.ca> <2527@ispi.COM> <zierke.724493009@rzdspc24>
  8. Date: Thu, 17 Dec 1992 17:40:12 GMT
  9. Lines: 32
  10.  
  11. In article <zierke.724493009@rzdspc24> zierke@rzdspc24.informatik.uni-hamburg.de (Reinhard Zierke) writes:
  12. > This explains what dos2unix does, but not WHY it has such strange behaviour.
  13. > Using software improperly MUST NOT lead to such damaging results. Beware
  14. > of such bad software engineering!
  15.  
  16. Agreed. NO program on UNIX should EVER use the
  17.  
  18.     command inputfile [outputfile]
  19.  
  20. syntax. It's dangerous, counterintuitive (you can't use it as a filter), and
  21. inflexible. Indent does the same thing, which is why I have indent in a script
  22. that does "indent -st" here.
  23.  
  24. If the command *requires* an outputfile (mv, cp, ln) it needs to do sanity
  25. checks, and accept multiple input files. The output file should NEVER be
  26. optional in this case:
  27.  
  28.     command inputfile outputfile
  29.     command inputfile... outputdir
  30.  
  31. If you NEED an optional output file, and for some reason redirects don't
  32. work, then flag it:
  33.  
  34.     command file... [-o outputfile]
  35.  
  36. I don't know what dos2unix and unix2dos do, but they should be using one
  37. of these alternatives.
  38. -- 
  39. Peter da Silva                                            `-_-'
  40. Ferranti International Controls Corporation                'U` 
  41. Sugar Land, TX  77487-5012 USA
  42. +1 713 274 5180                            "Zure otsoa besarkatu al duzu gaur?"
  43.