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

Re: Please tell me this is curable...



r3ck@home.com (rick) wrote:
>In article
><[🔎] Pine.LNX.4.04.10001241533440.14814-100000@benatar.snurgle.org> you
>wrote:
>> Maybe you transferred it in ASCII mode.  Hopefully you didn't transfer it
>> in ASCII mode when you sent it to the NT box because then you'll never get
>> it back.  If you did it in ASCII mode sending it back to the Linux system
>> then you must simply resend it in binary.
>
>The problem is the lf -> crlf switch.  Just reverse it.  There
>will be posts saying this won't work but it will.  You'd think
>it doesn't work because what about valid crlf pairs in the
>original data.  But they get changed to crcrlf by the ascii
>transfer and back to crlf by the fix.  It would be a problem
>if you were hitting the data recursively but you're just doing
>one pass.

ASCII transfer isn't clever enough to spot CRLFs, then? (Can't test this
just at the moment, so I'll take your word for it.)

>I know there are little windows utils to do this but someone
>can cobble up an awk one-liner or something.  I did it with rexx.

awk '{ print "\r" $0 }' seems to do it, though this is only lightly
tested.

-- 
Colin Watson                                           [cjw44@cam.ac.uk]


Reply to: