linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ctrl-M
@ 2003-08-27 19:03 Shawn Ashlee
  2003-08-27 19:34 ` ctrl-M Luciano Miguel Ferreira Rocha
  0 siblings, 1 reply; 2+ messages in thread
From: Shawn Ashlee @ 2003-08-27 19:03 UTC (permalink / raw)
  To: linux-admin

I have a bash script writting to a .procmailrc file, but it is putting 
in ctrl-M's where I have \r or \015. You can see them in vi but not when 
you cat the file. It wouldn't be a problem, but procmail cant read it 
with those in there. I tried \n, but it adds alot of blank lines.
The archives mostly talk about compatability for dos/linux, but that 
doesnt help me.

Thanks,
Shawn




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ctrl-M
  2003-08-27 19:03 ctrl-M Shawn Ashlee
@ 2003-08-27 19:34 ` Luciano Miguel Ferreira Rocha
  0 siblings, 0 replies; 2+ messages in thread
From: Luciano Miguel Ferreira Rocha @ 2003-08-27 19:34 UTC (permalink / raw)
  To: Shawn Ashlee; +Cc: linux-admin

On Wed, Aug 27, 2003 at 12:03:21PM -0700, Shawn Ashlee wrote:
> I have a bash script writting to a .procmailrc file, but it is putting 
> in ctrl-M's where I have \r or \015. You can see them in vi but not when 
> you cat the file. It wouldn't be a problem, but procmail cant read it 
> with those in there. I tried \n, but it adds alot of blank lines.
> The archives mostly talk about compatability for dos/linux, but that 
> doesnt help me.

There are a lot of options for converting files between 'dos' style (\r\n as
line separators) and the 'unix' style (only \n is used):

* dos2unix or unix2dos
* tr -d '\r' < dos_file > unix_file
* vi: edit file and set the fileformat option to unix or dos and save:
vi zbr
:set fileformat=unix
ZZ

Regards,
Luciano Rocha

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-27 19:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-27 19:03 ctrl-M Shawn Ashlee
2003-08-27 19:34 ` ctrl-M Luciano Miguel Ferreira Rocha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).