From owner-freebsd-newbies Thu Mar 29 10:25: 7 2001 Delivered-To: freebsd-newbies@freebsd.org Received: from q.closedsrc.org (ip233.gte15.rb1.bel.nwlink.com [209.20.244.233]) by hub.freebsd.org (Postfix) with ESMTP id 63FD737B71F for ; Thu, 29 Mar 2001 10:25:03 -0800 (PST) (envelope-from lplist@closedsrc.org) Received: by q.closedsrc.org (Postfix, from userid 1003) id 34B8F55407; Thu, 29 Mar 2001 10:15:05 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by q.closedsrc.org (Postfix) with ESMTP id 250CF51610; Thu, 29 Mar 2001 10:15:05 -0800 (PST) Date: Thu, 29 Mar 2001 10:15:05 -0800 (PST) From: Linh Pham To: "J.Goodleaf" Cc: Subject: Re: What is that ^M character? In-Reply-To: <20010329183144.635AE5C11@clyde.goodleaf.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-newbies@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On 2001-03-29, J.Goodleaf scribbled: # I have a file I'm playing with, output from a windoze based database # application. When I open it in vi or emacs it's loaded with ^M characters. # What the heck are those? Anyone have perl or shell scripts that would allow # me to strip them out or put them in? Windows text files include both the carriage return (CR) and the line feed (LF) to represent a newline. UNIX only uses the line feed (LF) if I'm correct... and the ^M ``character'' would represent the line feed character. There is a port in FreeBSD called dos2unix (or vice versa) that will allow you to convert between DOS/Windows based files to UNIX style files and the other way around. There are other ways of doing via sed, vi, tr, Emacs, etc. -- Linh Pham [lplist@closedsrc.org] // 404b - Brain not found To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-newbies" in the body of the message