From owner-freebsd-questions Wed Mar 25 03:22:14 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA21971 for freebsd-questions-outgoing; Wed, 25 Mar 1998 03:22:14 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from tyree.iii.co.uk (tyree.iii.co.uk [195.89.149.230]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA21966 for ; Wed, 25 Mar 1998 03:22:09 -0800 (PST) (envelope-from nik@iii.co.uk) From: nik@iii.co.uk Received: from carrig.strand.iii.co.uk (carrig.strand.iii.co.uk [192.168.7.25]) by tyree.iii.co.uk (8.8.8/8.8.8) with ESMTP id LAA21969; Wed, 25 Mar 1998 11:22:09 GMT Received: (from nik@localhost) by carrig.strand.iii.co.uk (8.8.8/8.8.7) id LAA00493; Wed, 25 Mar 1998 11:22:05 GMT Message-ID: <19980325112205.51229@iii.co.uk> Date: Wed, 25 Mar 1998 11:22:05 +0000 To: ken@mui.net Cc: freebsd-questions@FreeBSD.ORG Subject: Re: btw - ^M References: <199803242158.LAA12307@rocksalt.mui.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.85e In-Reply-To: <199803242158.LAA12307@rocksalt.mui.net>; from ken@mui.net on Tue, Mar 24, 1998 at 11:57:17AM +0000 Organization: interactive investor Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Mar 24, 1998 at 11:57:17AM +0000, ken@mui.net wrote: > um ... btw - is there an easy way to strip away the carriage returns > (^M) from text files on the dos side? Doing it manually is okay for > short stuff, but long files ...painful... tr(1) (which means "translate"). In a nutshell, if you've got file.dos, and you want to convert it to file.unix, do % tr "\r" "\n" < file.dos > file.unix which runs tr, translating the "\r" characters (the ^M) to Unix line ending characters ("\n"). N -- Work: nik@iii.co.uk | FreeBSD + Perl + Apache Rest: nik@nothing-going-on.demon.co.uk | Remind me again why we need Play: nik@freebsd.org | Microsoft? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message