Re: Remove ^M characters from xhtml file

2003-12-03 Thread parv
in message [EMAIL PROTECTED], wrote Rob Ellis thusly... On Tue, Dec 02, 2003 at 05:53:59PM -0500, parv wrote: It pains me not to see even a mention of sed ... To rectify the situation... sed -e 's/^M$//' old new mv -f new old Freebsd's sed has -i sed -ie 's/^M$//' old

Re: Remove ^M characters from xhtml file

2003-12-03 Thread Loz Froggatt
* paul beard [EMAIL PROTECTED] [2003-12-01 03:07]: On Nov 30, 2003, at 6:53 PM, Melvyn Sopacua wrote: BTW: why is this even an issue that needs a solution? XHTML doesn't care one way or the other, since all linear spacing is folded into one space. It's distracting to look at all that stuff

Re: Remove ^M characters from xhtml file

2003-12-03 Thread Gary Kline
FWIW, I'm attaching 'cvt' that I've used for years. It does conversions between dos, unix, vax, mac quite cleanly. Just untar and type make unix. Put the cvt binary into your ~/bin directory. % cvt -u files translates files from whatever fmt

Re: Remove ^M characters from xhtml file

2003-12-03 Thread Gary Kline
On Wed, Dec 03, 2003 at 11:12:28AM -0800, Gary Kline wrote: FWIW, I'm attaching 'cvt' that I've used for years. It does conversions between dos, unix, vax, mac quite cleanly. Just untar and type make unix. Put the cvt binary into your ~/bin directory. %

Re: Remove ^M characters from xhtml file

2003-12-02 Thread parv
in message [EMAIL PROTECTED], wrote Bryan Cassidy thusly... I've downloaded a couple of .xhtml files and they have ^M characters all through it. I tried the col -b name newname command on these files but when I do that it erases the whole document. Any ideas? Ah, a FAQ of comp.unix.*

Re: Remove ^M characters from xhtml file

2003-12-02 Thread James Schmidt
Using Vi, use this command :1,$ s/ctrl-vctrl-m//g HTH James On Tue, 2 Dec 2003, parv wrote: in message [EMAIL PROTECTED], wrote Bryan Cassidy thusly... I've downloaded a couple of .xhtml files and they have ^M characters all through it. I tried the col -b name newname command on

Re: Remove ^M characters from xhtml file

2003-12-02 Thread Marc Wiz
On Tue, Dec 02, 2003 at 04:58:06PM -0600, James Schmidt wrote: Using Vi, use this command :1,$ s/ctrl-vctrl-m//g To save two keystrokes try this :-) :% s/ctrl-vctrl-m//g Marc -- Marc Wiz [EMAIL PROTECTED] Yes, that really is my last name. ___

Re: Remove ^M characters from xhtml file

2003-12-02 Thread Rob Ellis
On Tue, Dec 02, 2003 at 05:53:59PM -0500, parv wrote: in message [EMAIL PROTECTED], wrote Bryan Cassidy thusly... I've downloaded a couple of .xhtml files and they have ^M characters all through it. I tried the col -b name newname command on these files but when I do that it erases the

Re: Remove ^M characters from xhtml file

2003-12-01 Thread Tijl Coosemans
On Sun, 30 Nov 2003 21:39:33 -0600, Bryan Cassidy wrote: Well, I take that back. It worked on 1 file and then ir started erasing the contents of the file. tr -d \\r file tmp mv tmp file or col -b file tmp mv tmp file ___ [EMAIL PROTECTED]

Re: Remove ^M characters from xhtml file

2003-12-01 Thread C. Ulrich
On Sun, 2003-11-30 at 21:18, Alex de Kruijff wrote: On Sun, Nov 30, 2003 at 09:16:02PM -0600, Bryan Cassidy wrote: I've downloaded a couple of .xhtml files and they have ^M characters all through it. I tried the col -b name newname command on these files but when I do that it erases the

Re: Remove ^M characters from xhtml file

2003-12-01 Thread Simon Gray
I've downloaded a couple of .xhtml files and they have ^M characters all through it. I tried the col -b name newname command on these files but when I do that it erases the whole document. Any ideas? handy little shell script i found a while ago which does exactly what you're after

Re: Remove ^M characters from xhtml file

2003-12-01 Thread Jerry McAllister
I've downloaded a couple of .xhtml files and they have ^M characters all through it. I tried the col -b name newname command on these files but when I do that it erases the whole document. Any ideas? This is because the file was created in MS-land. On your FreeBSd system do: tr -d \r

Re: Remove ^M characters from xhtml file

2003-12-01 Thread Shantanoo Mahajan
+++ Robin Schoonover [freebsd] [30-11-03 19:17 -0700]: | On Sun, 30 Nov 2003 21:16:02 -0600, Bryan Cassidy [EMAIL PROTECTED] | wrote: | I've downloaded a couple of .xhtml files and they have ^M characters | all through it. I tried the col -b name newname command on these | files but when I do

Re: Remove ^M characters from xhtml file

2003-12-01 Thread Big Daddy EBK
: Shantanoo Mahajan [EMAIL PROTECTED] Subject: Re: Remove ^M characters from xhtml file To: Robin Schoonover [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=us-ascii +++ Robin Schoonover [freebsd] [30-11-03 19:17 -0700]: | On Sun, 30 Nov 2003 21

Re: Remove ^M characters from xhtml file

2003-12-01 Thread M.D. DeWar
I found this one that works cat [filename] | tr -d '/r' out; mv out [new filename] Mark - Original Message - From: Big Daddy EBK [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 01, 2003 4:51 PM Subject: Re: Remove ^M characters from xhtml file Hello everyone, I'm very

Re: Remove ^M characters from xhtml file

2003-11-30 Thread Robin Schoonover
On Sun, 30 Nov 2003 21:16:02 -0600, Bryan Cassidy [EMAIL PROTECTED] wrote: I've downloaded a couple of .xhtml files and they have ^M characters all through it. I tried the col -b name newname command on these files but when I do that it erases the whole document. Any ideas? dos2unix

Re: Remove ^M characters from xhtml file

2003-11-30 Thread Alex de Kruijff
On Sun, Nov 30, 2003 at 09:16:02PM -0600, Bryan Cassidy wrote: I've downloaded a couple of .xhtml files and they have ^M characters all through it. I tried the col -b name newname command on these files but when I do that it erases the whole document. Any ideas? There's a port called

Re: Remove ^M characters from xhtml file

2003-11-30 Thread Bryan Cassidy
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sorry about sending you a e-mail directly. The tr -d '/r' name newname worked perfect. Thanks. On Sun, 30 Nov 2003 19:17:46 -0700 Robin Schoonover [EMAIL PROTECTED] wrote: On Sun, 30 Nov 2003 21:16:02 -0600, Bryan Cassidy [EMAIL PROTECTED]

Re: Remove ^M characters from xhtml file

2003-11-30 Thread Bryan Cassidy
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Well, I take that back. It worked on 1 file and then ir started erasing the contents of the file. On Sun, 30 Nov 2003 21:29:13 -0600 Bryan Cassidy [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sorry about sending you a

Re: Remove ^M characters from xhtml file

2003-11-30 Thread Gerard Samuel
On Sunday 30 November 2003 10:39 pm, Bryan Cassidy wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Well, I take that back. It worked on 1 file and then ir started erasing the contents of the file. perl -pi -e s:^M::g filenames Usually works for me. Picked it up from

Re: Remove ^M characters from xhtml file

2003-11-30 Thread Melvyn Sopacua
On Monday 01 December 2003 04:39, Bryan Cassidy wrote: Well, I take that back. It worked on 1 file and then ir started erasing the contents of the file. On Sun, 30 Nov 2003 21:29:13 -0600 Bryan Cassidy [EMAIL PROTECTED] wrote: Sorry about sending you a e-mail directly. The tr -d '/r'

Re: Remove ^M characters from xhtml file

2003-11-30 Thread paul beard
On Nov 30, 2003, at 6:53 PM, Melvyn Sopacua wrote: Another way: perl -pi.bak -e 's/\r$//' *.xhtml BTW: why is this even an issue that needs a solution? XHTML doesn't care one way or the other, since all linear spacing is folded into one space. It's distracting to look at all that stuff if

Re: Remove ^M characters from xhtml file

2003-11-30 Thread Bryan Cassidy
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Well, why have a BUNCH of ^M characters in your file if you don't *need* them? If there is no point in having these characters I want them removed. BTW, your command worked fine. I've tried it on several files and it works just fine. Thanks. On Mon,

Re: Remove ^M characters from xhtml file

2003-11-30 Thread Lars Eighner
On Sun, 30 Nov 2003, Bryan Cassidy wrote: I've downloaded a couple of .xhtml files and they have ^M characters all through it. I tried the col -b name newname command on these files but when I do that it erases the whole document. Any ideas? perl -pi -e s#\r##g filespecs If it is just one