This is the mail archive of the cygwin 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]
Other format: [Raw text]

RE: Continuing CR/LF Problems

Dave Korn wrote on Tuesday, January 30, 2007 12:30 PM:

> On 30 January 2007 15:50, Eramo, Mark wrote:
>> As part of this multiplatform installer it generates a
>> script from information in the Installshield jars. When the
>> is produced, all the lines are terminated with a "^M"
>   That'll be the bug then.  Report it upstream to the Ant maintainers.
>> If you look at SHELLOPTS in the environment, it indicates that it
>> knows about the igncr setting.
>> en ts:monitor"
>   There's nothing that bash can do about this.  It's not bash that
> creates these scripts, it's the installshield program. 
>> I cannot do a simple d2u because there are some "^M's" that need to
>> be in the file and this will remove them thus corrupting the file.
>   What?!  This is a shell script, intended to run on a linux-alike
> system which doesn't understand ^M.  How can they be "necessary"? 

On a binary mount, just running something through sed will remove \r
("^M") from the line ends without removing other occurrences of \r.

/c> echo -e '1111\r22\r' | od -c
0000000   1   1   1   1  \r   2   2  \r  \n
/c> echo -e '1111\r22\r' | sed -e 's/ / /' | od -c
0000000   1   1   1   1  \r   2   2  \n

Use of the sed -i option will modify files in place.

Try it.  YMMV

- Barry
  -  Disclaimer: Statements made herein are not made on behalf of NIAID.

Unsubscribe info:
Problem reports:

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