dos2unix/d2u does nothing

2002-11-22 Thread Shing-Fat Fred Ma
Cygwin DLL version info:
   DLL version: 1.3.15
   DLL epoch: 19

Hello,

I'm finding that dos2unix and d2u doesn't
change a file in-place, even with -U (the
timestamp doesn't even change).  It works
find for stdin-to-stdout, though.   Just
thought I'd share my feelings on that
(that is, I feel it doesn't work in-place, but
thank goodness it works).

Fred

--
Fred Ma, [EMAIL PROTECTED]
Carleton University, Dept. of Electronics
1125 Colonel By Drive, Ottawa, Ontario
Canada, K1S 5B6



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: dos2unix/d2u does nothing

2002-11-22 Thread Randall R Schulz
Fred,

It works OK for me. You may be experiencing an interaction with a text mode 
mount (though from the looks of it, "conv.c" was ported for cygwin to open 
files in binary mode, so this shouldn't happen).

As to the mod time, perhaps you wrote the file and then converted it within 
the same minute, so "ls -l" doesn't show a change in the modification time 
(even though the difference is there at the finer time resolution that the 
OS and / or file system uses to record file modification times).

By the way, dos2unix and d2u are identical (byte-for-byte).

The other thing I can think of is that you're not running the dos2unix from 
the "cygutils" package, that the version you're running was not ported to 
Cygwin to be immune to the mount type and (conceivably) that it resets the 
file's modification time after reformatting it.

Randall Schulz
Mountain View, CA USA


At 20:36 2002-11-22, Shing-Fat Fred Ma wrote:

Hello,

I'm finding that dos2unix and d2u doesn't change a file in-place, even 
with -U (the timestamp doesn't even change).  It works find for 
stdin-to-stdout, though.   Just thought I'd share my feelings on that 
(that is, I feel it doesn't work in-place, but thank goodness it works).

Fred


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




RE: dos2unix/d2u does nothing

2002-11-25 Thread David Kilroy
I have seen similar behaviour to what Fred sees, but I can't remember if
that was u2d or d2u. In that case the files had mixed use of \n and \r\n
line endings. I presumed d2u/u2d detected a single \n (or \r\n) in the first
X bytes, and assumed the file was already in the appropriate format.

I 'fixed' this by running u2d then d2u (or vice versa).

Dave.

> -Original Message-
> From: Randall R Schulz [mailto:[EMAIL PROTECTED]]
> Sent: 23 November 2002 05:12
> To: [EMAIL PROTECTED]
> Subject: Re: dos2unix/d2u does nothing
> 
> 
> Fred,
> 
> It works OK for me. You may be experiencing an interaction 
> with a text mode 
> mount (though from the looks of it, "conv.c" was ported for 
> cygwin to open 
> files in binary mode, so this shouldn't happen).
> 
> As to the mod time, perhaps you wrote the file and then 
> converted it within 
> the same minute, so "ls -l" doesn't show a change in the 
> modification time 
> (even though the difference is there at the finer time 
> resolution that the 
> OS and / or file system uses to record file modification times).
> 
> By the way, dos2unix and d2u are identical (byte-for-byte).
> 
> The other thing I can think of is that you're not running the 
> dos2unix from 
> the "cygutils" package, that the version you're running was 
> not ported to 
> Cygwin to be immune to the mount type and (conceivably) that 
> it resets the 
> file's modification time after reformatting it.
> 
> Randall Schulz
> Mountain View, CA USA
> 
> 
> At 20:36 2002-11-22, Shing-Fat Fred Ma wrote:
> 
> >Hello,
> >
> >I'm finding that dos2unix and d2u doesn't change a file 
> in-place, even 
> >with -U (the timestamp doesn't even change).  It works find for 
> >stdin-to-stdout, though.   Just thought I'd share my 
> feelings on that 
> >(that is, I feel it doesn't work in-place, but thank 
> goodness it works).
> >
> >Fred
> 
> 
> --
> Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting: http://cygwin.com/bugs.html
> Documentation: http://cygwin.com/docs.html
> FAQ:   http://cygwin.com/faq/
> 

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: dos2unix/d2u does nothing

2002-11-25 Thread Shing-Fat Fred Ma
>
> Subject:
> RE: dos2unix/d2u does nothing
> From:
> David Kilroy <[EMAIL PROTECTED]>
> Date:
> Mon, 25 Nov 2002 13:33:42 -
> To:
> [EMAIL PROTECTED]
>
>
>I have seen similar behaviour to what Fred sees, but I can't remember if
>that was u2d or d2u. In that case the files had mixed use of \n and \r\n
>line endings. I presumed d2u/u2d detected a single \n (or \r\n) in the first
>X bytes, and assumed the file was already in the appropriate format.
>
>I 'fixed' this by running u2d then d2u (or vice versa).
>
>Dave.
>
>
>
>>-Original Message-
>>From: Randall R Schulz [mailto:[EMAIL PROTECTED]]
>>Sent: 23 November 2002 05:12
>>To: [EMAIL PROTECTED]
>>Subject: Re: dos2unix/d2u does nothing
>>
>>
>>Fred,
>>
>>It works OK for me. You may be experiencing an interaction
>>with a text mode
>>mount (though from the looks of it, "conv.c" was ported for
>>cygwin to open
>>files in binary mode, so this shouldn't happen).
>>
>>As to the mod time, perhaps you wrote the file and then
>>converted it within
>>the same minute, so "ls -l" doesn't show a change in the
>>modification time
>>(even though the difference is there at the finer time
>>resolution that the
>>OS and / or file system uses to record file modification times).
>>
>>By the way, dos2unix and d2u are identical (byte-for-byte).
>>
>>The other thing I can think of is that you're not running the
>>dos2unix from
>>the "cygutils" package, that the version you're running was
>>not ported to
>>Cygwin to be immune to the mount type and (conceivably) that
>>it resets the
>>file's modification time after reformatting it.
>>
>>Randall Schulz
>>Mountain View, CA USA
>>

Hi, All,

It's in the cygwin file tree, /usr/bin/dos2unix version 0.1.2.
The file was a few minutes old when I tried in-place conversion.
Anything is possible, regarding preserving the file timestamp
even after the conversion (afterall, I think some gzip's do that).
My "fix" is to use it as a filter.

Fred

--
Fred Ma, [EMAIL PROTECTED]
Carleton University, Dept. of Electronics
1125 Colonel By Drive, Ottawa, Ontario
Canada, K1S 5B6





--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/