From owner-freebsd-questions@FreeBSD.ORG Fri Jun 20 16:01:02 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF31737B401 for ; Fri, 20 Jun 2003 16:01:02 -0700 (PDT) Received: from mail.munk.nu (213-152-51-194.dsl.eclipse.net.uk [213.152.51.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1AD1F43FB1 for ; Fri, 20 Jun 2003 16:01:02 -0700 (PDT) (envelope-from munk@mail.munk.nu) Received: from munk by mail.munk.nu with local (Exim 4.20) id 19TUsP-0008cW-VM for questions@FreeBSD.org; Sat, 21 Jun 2003 00:01:01 +0100 Date: Sat, 21 Jun 2003 00:01:01 +0100 From: Jez Hancock To: questions@FreeBSD.org Message-ID: <20030620230101.GC27738@users.munk.nu> Mail-Followup-To: questions@FreeBSD.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Sender: User Munk Subject: Re: tr X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2003 23:01:03 -0000 On Fri, Jun 20, 2003 at 01:44:37PM -0600, Fabio Miranda Hamburger wrote: > How can I remove annoy "^D" end of line from MS systems? > I know there is an utility called dos2unix. > But I think It's possible to do it with freebsd tr. > How would that be? As well as the method mentioned in the replies above, you can also do this with 'col': cat file | col -bx > tmp.txt && mv tmp.txt file One annoying feature of this though is it changes tabs to spaces. Yet another way is to do a global search/replace in vim: :%s/ //g (note this is ctrl-v-m, not ^(caret symbol) m!) There are a lot of other ways too :)