From owner-freebsd-questions Sun Aug 31 17:40:18 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id RAA26486 for questions-outgoing; Sun, 31 Aug 1997 17:40:18 -0700 (PDT) Received: from nico.telstra.net (nico.telstra.net [139.130.204.16]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id RAA26480 for ; Sun, 31 Aug 1997 17:40:13 -0700 (PDT) Received: from freebie.lemis.com (gregl1.lnk.telstra.net [139.130.136.133]) by nico.telstra.net (8.6.10/8.6.10) with ESMTP id KAA03901; Mon, 1 Sep 1997 10:39:40 +1000 Received: (grog@localhost) by freebie.lemis.com (8.8.7/8.6.12) id KAA12525; Mon, 1 Sep 1997 10:09:38 +0930 (CST) Message-ID: <19970901100937.07818@lemis.com> Date: Mon, 1 Sep 1997 10:09:37 +0930 From: Greg Lehey To: Charles Henrich Cc: FreeBSD Questions Subject: Re: Stripping ^M from llines? References: <5ud18g$u9$1@msunews.cl.msu.edu> <199709010021.UAA12496@crh.cl.msu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Mailer: Mutt 0.81e In-Reply-To: <199709010021.UAA12496@crh.cl.msu.edu>; from Charles Henrich on Sun, Aug 31, 1997 at 08:21:48PM -0400 Organisation: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8250 Fax: +61-8-8388-8250 Mobile: +61-41-739-7062 WWW-Home-Page: http://www.lemis.com/~grog Fight-Spam-Now: http://www.cauce.org X-MIME-Autoconverted: from 8bit to quoted-printable by freebie.lemis.com id KAA12525 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.freebsd.org id RAA26481 Sender: owner-freebsd-questions@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk On Sun, Aug 31, 1997 at 08:21:48PM -0400, Charles Henrich wrote: > In lists.freebsd.questions you write: > > >> Well, I suppose it's a matter of opinion whether that's an easy way to >> solve the problem. It requires a lot of keyboard input. Here's one >> which I would use. To compile, just: > >> $ cc stripcr.c -o stripcr > >> It's a filter: that is, you run it like this: > >> $ stripcr outfile > >> The reason for this isn't laziness: that way, you can pipe things into >> it. > > Even easier: sed 's/^M//' file2 Touché. For some reason that evaded my mind. Must be too early in the morning. Greg