dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]pnetlib: Un*x file endings please


From: Hans-Olof Danielsson
Subject: Re: [DotGNU]pnetlib: Un*x file endings please
Date: Tue, 26 Mar 2002 23:11:58 +0100

Try command

tr -d '\r' < source > target

if on GNU/Linux,
where source and target is the name of
the source resp. target file.

Regards / Hans-Olof

----- Original Message -----
From: "S11001001" <address@hidden>
To: <address@hidden>
Sent: Tuesday, March 26, 2002 10:36 PM
Subject: [DotGNU]pnetlib: Un*x file endings please


> Going through some patches, I noticed a pattern like this alot:
>
> ! contents
> ! of
> ! old
> ! file
> SEPARATOR
> ! contents
> ! of
> ! new
> ! file
>
> I figured out, this is because the old file used Unix file endings (0x0A),
> while the new file had been saved in a text editor that replaced all the
file
> endings with DOS file endings (0x0C0A). The diff program doesn't pick up
that
> this difference is unimportant, so instead of the nice diff it usually
shows,
> what with +lines and -lines, it shows something where I can't pick up all
> differences just by looking at it.
>
> So if someone could point out a good utility to convert CRLF to LF, and
those
> not using software that preserves the original line endings could run
their
> files through this utility before running make-patch.sh, it would be
easier to
> do patch review, and hence faster to apply them.
>
> p.s. I think if you pipe it through sed 's/\x0d\x0a/\x0a/', it should do
the
> trick. for some reason that doesn't work though...anyway, after a diff it
is
> too late to fix it.
>
> --
> Shoot me again.
> Just proving that the quickest way to solve the problem is to post a
> whine to the newsgroups: within moments the solution presents itself to
> me, and meanwhile my ass is hanging out on the Net... *sigh*...
> -- Dave Phillips, address@hidden, about problem solving via news
>
> _______________________________________________
> Developers mailing list
> address@hidden
> http://subscribe.dotgnu.org/mailman/listinfo/developers
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]