🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.4bsd
Article #371

Re: A serious bug in unix2dos/dos2unix

#371
From: Jonathan Bayer
Date: Mon, 14 Dec 1992 18:59
31 lines
1667 bytes
haiying@cs.mcgill.ca (Haiying ZHANG) writes:


>   I came across this bug a while ago. This has to do with using wild
>card in file names with unix2dos/dos2unix.

>   If you use a wild card in the file name, be it a single * or a ?
>embedded in a pattern, these two handy utilities will wipe out your
>entire current directory with the exception of the first file. It will
>set all the rest of the file to size 0. 

>   Although the man page does mention anything about wild card in
>filename making one believe that it is not supported, it should not in
>any case cause serious damaging to your files. While I am at it, these
>two programs look like a recompile of its DOS version. It should have
>provided more - options such as -Rfp etc. as in cp. 


First, what system are you running on?  Second, what are you trying to do?
On a Sun system the dos2unix command is designed to operate on ONE file only,
sending the output to the second file specification.  The wild cards are
expanded by the shell, and all the program sees is a long list of filenames.

It appears that you may be using it improperly.


JB
-- 
Jonathan Bayer		Intelligent Software Products, Inc.
(908) 248-1853		37 Winthrop Rd. 
jbayer@ispi.COM		Edison, NJ   08817
Technical Details
Message-ID: <2527@ispi.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!ispi!jbayer
References: <1992Dec12.224109.15621@cs.mcgill.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ispi!jbayer
From: jbayer@ispi.COM (Jonathan Bayer)
Newsgroups: comp.bugs.4bsd,comp.bugs.sys5,comp.bugs.misc,comp.sources.bugs
Subject: Re: A serious bug in unix2dos/dos2unix
Message-ID: <2527@ispi.COM>
Date: 14 Dec 92 18:59:27 GMT
References: <1992Dec12.224109.15621@cs.mcgill.ca>
Followup-To: comp.bugs.4bsd
Organization: Intelligent Software Products, Inc.
Lines: 31