[Top][All Lists]

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

[DotGNU]pnetlib: Un*x file endings please

From: S11001001
Subject: [DotGNU]pnetlib: Un*x file endings please
Date: Tue, 26 Mar 2002 15:36:52 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:0.9.9) Gecko/20020310

Going through some patches, I noticed a pattern like this alot:

! contents
! of
! old
! file
! 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, 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

reply via email to

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