ctrl-M
am 27.08.2003 21:03:21 von Shawn Ashlee
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
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: ctrl-M
am 27.08.2003 21:34:31 von Luciano Miguel Ferreira Rocha
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
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html