On 17 Feb 2003 21:07:20 +1030
David Fitch <[EMAIL PROTECTED]> wrote:

> On Mon, 2003-02-17 at 20:44, [EMAIL PROTECTED] wrote:
> > I've never been able to figure out a portable way
> > to mangle control chars with sed.
> 
> if it's cos you're trying to use a dos file then just
> run 'dos2unix' over the file (and vice versa use 'unix2dos').

Yeah, but I never really trusted those programs, since
(on Solaris at least) they always whinge about character
sets or locales or something.

And it seems my suspicion is not unwarranted:

[mlh@localhost mlh]$ od -xc stuff
0000000 0a0d
         \r  \n
0000002
[mlh@localhost mlh]$ cat stuff|dos2unix|od -xc
0000000 000a
         \n  \0
0000001


What the hell is that null doing there?


--
Matt

-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to