From owner-freebsd-questions Sun Jan 10 22:59:50 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA16933 for freebsd-questions-outgoing; Sun, 10 Jan 1999 22:59:50 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from mail.rdc1.sfba.home.com (ha1.rdc1.sfba.home.com [24.0.0.66]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA16927 for ; Sun, 10 Jan 1999 22:59:49 -0800 (PST) (envelope-from charon@freethought.org) From: charon@freethought.org Received: from c40948-a ([24.1.7.99]) by mail.rdc1.sfba.home.com (InterMail v4.0 201-221-107) with SMTP id <19990111065917.UIQG21127.mail.rdc1.sfba.home.com@c40948-a> for ; Sun, 10 Jan 1999 22:59:17 -0800 Message-Id: <3.0.5.32.19990110225910.00a2f220@mail> X-Sender: tuathadedanann@mail X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Sun, 10 Jan 1999 22:59:10 -0800 To: questions@FreeBSD.ORG Subject: replacing ^M in vi Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Whenever I save a plain text file in WinNT and open it in FreeBSD, at the end of every line is a "^M". How do I get rid of these? I tried writing a little C++ program to copy all text except "^M" to another file, but it doesn't work because C++ treats the ^ and the M as different characters, whereas vi treats them as _one_ character. After searching the mailing list archives, I came up with the syntax ":%s/stuff/other stuff/g" as the oh-so-intuitive replace command in vi, and I tried it, but to no avail (it says "no match found"). Any suggestions? Thanks, Charon@freethought.org http://members.home.net/tuathadedanann/ alt.sex.fetish.hamster.duct-tape To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message