public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Append: file contains ^M characters for binmode mount
@ 2002-04-23  3:37 lau bella
  2002-04-23  6:53 ` Larry Hall (RFK Partners, Inc)
  0 siblings, 1 reply; 2+ messages in thread
From: lau bella @ 2002-04-23  3:37 UTC (permalink / raw)
  To: cygwin

Hi all,

Append to previous message, i found somethings:
1/ When i run bash script in cygwin, e.g.
   #!/bin/bash
   echo "123" >> output_file
   echo "456" >> output_file
   echo "789" >> output_file
   
   the output file is in unix mode, i.e. without ^M at
the end of each line. 

2/ When i run perl (cygwin perl), exp (export of
oracle) and ftp in cygwin, the output files are in DOS
format. When i vi the output files, the ^M is not
appear in vi, but at the bottom of screen, it shows 

"fileabc" [dos format] 3 lines, 209 characters

Is the output_file generated by other software (e.g.
oracle, perl) should generated as DOS mode, even run
in cygwin ? But perl is bundled by cygwin.

Thanks again. 




Hi all,

I installed Cygwin 1.3.10 in another w2k machine (
this time i installed in w2k professional). I used
"unix format" to install. All mount point are in
binmode:

c:\cygwin\bin on /usr/bin type system (binmode)
c:\cygwin\lib on /usr/bin type system (binmode)
c: on /cygdrive/c type system (binmode)

As I want to simpify the problem to see whether it
related to "binmode" or not, i installed cygwin in c:\
cygwin and use c:\cygwin\home as home directory.

I run the perl (/usr/bin/perl) script again, 
1. I use "vi output_file", i cannot see ^M at the end
of each line. But at the bottom of screen, i see 

"fileabc" [dos format] 3 lines, 209 characters

2. When i use "cat -v output_file", ^M are contain at
the end of each lines.

3. When i use "od -c output_file", "\r\n" conatin at
the end of each lines.

4. When i run "dos2unix output_file", the file size
decrese.

I would like the output file should be in UNIX format.
Would you mind give me some
suggestion. Thanks for your kindly help.

Bella

>> In w2k advanced server (Service Pack 2), i have
local
>>drive c:, d:, e:, f:. In cygwin, the default mount :


>>d:\cygwin\bin on /usr/bin type system (binmode) 
>>d:\cygwin on /usr/lib type system (binmode)
>>c:\ on  /cygdrive/c type system (textmode) 
>>d:\ on /cygdrive/d type system (textmode) 
>>e:\ on /cygdrive/e type system (textmode) 
>>f:\ on /cygdrive/f type system (textmode)

>>I set CYGWIN=ntsec in system environment and
registry.

>>Cygwin is installed in d:\.
>>I make home directory in f:\. The following actions
are done in f:\ :
>>1. I have a perl script which will generate a output
file. I use perl complier provided by Cygwin
(/usr/perl) to run the perl script. The file size of
the output file decrease when i run "dos2unix". Thus,
i think the output file is in DOS format (with ^M
control character). 

>> 2. I use Cygwin ftp server to ftp file from PC (say
w2k professional) to the w2k Server f:\. The file size
also
decrease when i run "dos2unix" command. i use ascii
mode to ftp.

>>3. When i use "vi" to create file in cygwin and run
dos2unix, the file size is NOT change.

>>I think i miss some setting in Cygwin, so the files
in
point 1 and 2 are in DOS format, but not for point 3. 

>>Do i need to change mount point e.g. (f:\) to
binmode,
>>how to do it ? 

>>thanks a lot :-) 

>>bella 

>On Mon, Apr 22, 2002 at 11:29:44AM +0800, lau bella
>wrote:

>mount --help

>Corinna

_______________________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com.hk address at http://mail.english.yahoo.com.hk

--
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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Append: file contains ^M characters for binmode mount
  2002-04-23  3:37 Append: file contains ^M characters for binmode mount lau bella
@ 2002-04-23  6:53 ` Larry Hall (RFK Partners, Inc)
  0 siblings, 0 replies; 2+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2002-04-23  6:53 UTC (permalink / raw)
  To: lau bella, cygwin

At 06:33 AM 4/23/2002, lau bella wrote:
>Hi all,
>
>Append to previous message, i found somethings:
>1/ When i run bash script in cygwin, e.g.
>    #!/bin/bash
>    echo "123" >> output_file
>    echo "456" >> output_file
>    echo "789" >> output_file
>    
>    the output file is in unix mode, i.e. without ^M at
>the end of each line. 
>
>2/ When i run perl (cygwin perl), exp (export of
>oracle) and ftp in cygwin, the output files are in DOS
>format. When i vi the output files, the ^M is not
>appear in vi, but at the bottom of screen, it shows 
>
>"fileabc" [dos format] 3 lines, 209 characters
>
>Is the output_file generated by other software (e.g.
>oracle, perl) should generated as DOS mode, even run
>in cygwin ? But perl is bundled by cygwin.


Yep.  Historically, this has been an issue for Perl (from Cygwin).  I believe
the issue persists.  Check the email archives if you want more information.



Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
838 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX


--
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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-23 13:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-23  3:37 Append: file contains ^M characters for binmode mount lau bella
2002-04-23  6:53 ` Larry Hall (RFK Partners, Inc)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).