From owner-freebsd-questions Tue Sep 24 02:28:54 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id CAA06370 for questions-outgoing; Tue, 24 Sep 1996 02:28:54 -0700 (PDT) Received: from mail.EUnet.hu (mail.eunet.hu [193.225.28.100]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id CAA06333 for ; Tue, 24 Sep 1996 02:28:46 -0700 (PDT) Received: by mail.EUnet.hu, id LAA00910; Tue, 24 Sep 1996 11:28:35 +0200 Received: by CoDe.CoDe.hu (KAA01418); Tue, 24 Sep 1996 10:10:52 GMT From: Gabor Zahemszky Message-Id: <199609241010.KAA01418@CoDe.CoDe.hu> Subject: Re: MS-DOS text files in UNIX To: freebsd-questions@freebsd.org Date: Tue, 24 Sep 1996 10:10:52 +0000 (GMT) Cc: randyd@nconnect.net In-Reply-To: <324754C2.41C67EA6@nconnect.net> from "Randall D. DuCharme" at Sep 23, 96 10:25:54 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > Greetings, > I've read numerous things about adding the CR-LF back into text files > for use with DOS, but what about the other way?? Is there a way to > remove > that annoying ^M from a DOS text file under FBSD? I've tried many > things > but nothing short of removing them one-by-one seems to work. What about this one: sed -e 's/\015//' filename > filename.new ; mv filename.new filename or tr -d '\015' < filename > filename.new ; mv filename.new filename -- Gabor Zahemszky -:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:- Earth is the cradle of human sense, but you can't stay in the cradle forever. Tsiolkovsky