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