[lug] How do I convert a DOS file to a UNIX file?

j davis davis_compz at hotmail.com
Thu Jun 27 12:31:11 MDT 2002


you can also download utilites like Dos2Unix

http://userpage.chemie.fu-berlin.de/~winkelma/Misc/Perl/Scripts/Dos-Unix/

jd


>From: "Dhruva B. Reddy" <bdhruva at gmx.net>
>Reply-To: lug at lug.boulder.co.us
>To: lug at lug.boulder.co.us
>Subject: Re: [lug] How do I convert a DOS file to a UNIX file?
>Date: Thu, 27 Jun 2002 12:15:29 -0600
>MIME-Version: 1.0
>Received: from [66.54.152.73] by hotmail.com (3.2) with ESMTP id 
>MHotMailBEE4A17900334004326442369849041A0; Thu, 27 Jun 2002 11:16:26 -0700
>Received: (qmail 13065 invoked by uid 0); 27 Jun 2002 18:16:11 -0000
>Received: from localhost (HELO community.tummy.com) 
>(?YqVel/L5MKuUlwo7Ca631vI17Hkd863A?@127.0.0.1)  by localhost with SMTP; 27 
>Jun 2002 18:16:05 -0000
>Received: (qmail 12911 invoked by alias); 27 Jun 2002 18:15:57 -0000
>Received: (qmail 12908 invoked by uid 0); 27 Jun 2002 18:15:56 -0000
>Received: from dsl-64-194-51-137.telocity.com (HELO greatspacetoaster) 
>(64.194.51.137)  by community.tummy.com with SMTP; 27 Jun 2002 18:15:54 
>-0000
>Received: from d-man by greatspacetoaster with local (Exim 3.35 #1 
>(Debian))id 17Ndnl-0000sT-00for <lug at lug.boulder.co.us>; Thu, 27 Jun 2002 
>12:15:29 -0600
>From lug-admin at lug.boulder.co.us Thu, 27 Jun 2002 11:16:47 -0700
>Return-Path: <alias-blug_dom-lug-owner at lug.boulder.co.us>
>Delivered-To: mailman-lists.lug.boulder.co.us-lug at lists.lug.boulder.co.us
>Delivered-To: alias-blug_dom-lug at lug.boulder.co.us
>Message-ID: <20020627181529.GA3357 at dr.mobizinc.com>
>References: <3D1B50F4.5AC1165E at bigplanet.com>
>In-Reply-To: <3D1B50F4.5AC1165E at bigplanet.com>
>User-Agent: Mutt/1.3.28i
>Sender: lug-admin at lug.boulder.co.us
>Errors-To: lug-admin at lug.boulder.co.us
>X-BeenThere: lug at lug.boulder.co.us
>X-Mailman-Version: 2.0.11
>Precedence: bulk
>List-Help: <mailto:lug-request at lug.boulder.co.us?subject=help>
>List-Post: <mailto:lug at lug.boulder.co.us>
>List-Subscribe: 
><http://lists.lug.boulder.co.us/mailman/listinfo/lug>,<mailto:lug-request at lug.boulder.co.us?subject=subscribe>
>List-Id: Boulder (Colorado) Linux Users Group -- General Mailing List 
><lug.lug.boulder.co.us>
>List-Unsubscribe: 
><http://lists.lug.boulder.co.us/mailman/listinfo/lug>,<mailto:lug-request at lug.boulder.co.us?subject=unsubscribe>
>List-Archive: <http://lists.lug.boulder.co.us/pipermail/lug/>
>
>Unless I'm mistaken, this is caused by those annoying carriage returns
>(that ^M crap).  I found a way to do it on the web somewhere and
>incorporated it into the script below.
>
>---BEGIN SCRIPT---
>#!/bin/sh
>
>echo "Removing M$ carriage returns from $1..."
>
>tr < $1 > $2 -d '\r'
>
>echo "M$ carriage return free file is $2."
>---END SCRIPT---
>
>This creates a copy of the file sans the carriage returns.  You can then
>just overwrite the original with the copy.
>
>Dhruva
>
>On Thu, Jun 27, 2002 at 01:52:52PM -0400, Scott Lockhart soliloquized 
>thusly:
> > Folks,
> > Due to strict DMZ requirements at a particular client,
> > I am not allowed to ftp UNIX files from one Linux server directly to
> > another.
> > Instead, I have to ftp to a general staging area, copy to a Windows 2000
> > server,
> > burn a CD-ROM, then mount the CD-ROM on my DMZ'd Linux Server.
> > Major pain in the a**!
> >
> > When I go to edit the file on my destination Linux server,
> > it is now recognized by "vi" as a DOS file!
> > I suspect this is being done by the CD-ROM burner as far as setting a
> > file format.
> > I have tried specifying an ISO 9660 format for the CD-ROM,
> > but all this does is mess up the file names to the old 8.3 format,
> > and the files themselves still get whacked into a DOS filetype.
> >
> > How can I convert a file designated as a DOS type, to a UNIX type?
> >
> > Thanks in advance,
> > Scott Lockhart
>_______________________________________________
>Web Page:  http://lug.boulder.co.us
>Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
>Join us on IRC: lug.boulder.co.us port=6667 channel=#colug


thanks,
jd

jd at taproot.bz
http://www.taproot.bz

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com




More information about the LUG mailing list