From owner-freebsd-questions@FreeBSD.ORG Mon Nov 24 06:29:33 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 168A716A4CE for ; Mon, 24 Nov 2003 06:29:33 -0800 (PST) Received: from iwmail.xpdial.com (iwgate.xpdial.com [68.156.89.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5957543F85 for ; Mon, 24 Nov 2003 06:29:01 -0800 (PST) (envelope-from mark@s-wit.net) Received: from [192.168.101.250] by iwmail.xpdial.com (ArGoSoft Mail Server Pro for WinNT/2000/XP, Version 1.8 (1.8.4.1)); Mon, 24 Nov 2003 09:32:28 -0500 Message-ID: <017801c3b297$e8404dc0$fa65a8c0@ocfl061> From: "M.D. DeWar" To: "Zhang Weiwu" , References: <3FBF5DEA.2030405@hotmail.com> Date: Mon, 24 Nov 2003 09:33:17 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Subject: Re: newbie: use in RE? 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: Mon, 24 Nov 2003 14:29:33 -0000 i find this and seems to work good. cat {filename} | tr -d '/r' > out; mv out {new filename} It gets rid of all them ^M from the files for me. HTH Mark ----- Original Message ----- From: "Zhang Weiwu" To: Sent: Saturday, November 22, 2003 8:00 AM Subject: newbie: use in RE? > Hello. Just want to know how to use special character in Regular Expression. > > I wish to remove all the carrier returns from a text file, I can use: > tr -d "\r" < text_file > modified_text_file > But if I do: > sed -i s/\r//g text_file > it actually removes all the character "r" from the file. > > This is also a problem in vi(1). Besides I wish to manipulate > tabstops and line-feeds with RE too. > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >