From owner-freebsd-questions@FreeBSD.ORG Sat Nov 22 07:49:58 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 2D8DE16A4CE for ; Sat, 22 Nov 2003 07:49:58 -0800 (PST) Received: from endif.cjb.net (65-101-229-205.dnvr.qwest.net [65.101.229.205]) by mx1.FreeBSD.org (Postfix) with SMTP id C1DB943F93 for ; Sat, 22 Nov 2003 07:49:56 -0800 (PST) (envelope-from end@endif.cjb.net) Received: (qmail 67873 invoked from network); 22 Nov 2003 15:49:55 -0000 Received: from localhost (127.0.0.1) by localhost with SMTP; 22 Nov 2003 15:49:55 -0000 Date: Sat, 22 Nov 2003 08:49:55 -0700 From: Robin Schoonover To: Scott W Message-Id: <20031122084955.00d019ce.end@endif.cjb.net> In-Reply-To: <3FBF845E.7040905@mindcore.net> References: <200311221449.hAMEnNT24343@clunix.cl.msu.edu> <3FBF845E.7040905@mindcore.net> X-Mailer: Sylpheed version 0.9.6claws (GTK+ 1.2.10; i386-portbld-freebsd5.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: Jerry McAllister cc: Zhang Weiwu cc: freebsd-questions@freebsd.org 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: Sat, 22 Nov 2003 15:49:58 -0000 On Sat, 22 Nov 2003 10:44:30 -0500, Scott W wrote: > Jerry McAllister wrote: > > > >So why not just use tr? \t should get tabs, as you noted \r gets > >CRs I don't know linefeed off hand, but wouldn't be surprised if it was > >\l. It follows the usual conventions. > > > >There are more things besides -d that you can do with tr also. > > You can do what you want in vi or sed, you just need to escape the first > escape character, eg > sed -i s/\\r//g > vi: > :/s/\\r//g > > Note that with your tr string, you're already 'wrapping' the backslash-r > in double quotes, thereby avoiding shell expansion.. > > You can also use the dos2unix command, although I don't see it in > ports... > converters/unix2dos -- Robin Schoonover (aka End) # # The only cure for insomnia is to get more sleep. #