This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How do I remove CR/LF from text file


Larry Hall wrote:
> How about piping it through tr, mapping \n to \r\n?
>
I can't seem to get tr to exchange more than one character since I am 
only starting with one character.

 tr "[\n]" "[\n\r]" < /tmp/foo >/windows/temp/foo2     no apparent change

 tr "[\n]" "[\r]" < /tmp/foo >/windows/temp/foo2  No apparent change when 
looking in Notepad

 tr "[\n]" "[~]" < /tmp/foo >/windows/temp/foo2  all then newlines 
changed to ~

Got any idea what I am doing wrong - I don't see any other flags or 
switches that might make a difference.



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]