This is the mail archive of the cygwin@sourceware.cygnus.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: echo is wrong...


> In the Linux
> 
> [nagyl@piheno nagyl]$ echo  "aaa"|od -c
> 0000000   a   a   a  \n
> 0000004
> 
> In the windows NT bash
> 
> bash-2.01$ echo aaa|od -c
> 0000000   a   a   a  \r  \n
> 0000005
> 
> 
> What the hell is the \r ????? 

In the DOS/Win32 world, text files have CR LF line endings, as opposed to
Unix's LF only.  Since echo generates text, it is simply following the
convention of the operating system and outputting a proper text file.

> I'm running ./configure script (under cygwin bash) and this is failed, because
> the echo isn't compatible with the Unixs echo...
> 
> How to setup (configure etc..) my bash or my echo ?

Actually, I think that configure needs to be fixed, since it aparently
isn't compatible with the DOS/Win32 world.  Failing that, I think that there
is some way to set cygwin so that pipes are created in a binary-only mode,
which will give you Unix style text files.  This is similar to mounting
filesystems with -b, which forces opens to be in binary-only mode.  You
will want to do that as well if you want Unix style text files consistently
throughout.  Note that you will no longer be able to read and write DOS/Win32
text files, so compatibility with the rest of the DOS/Win32 world will be
given up.  Although *most* DOS/Win32 applications can read Unix style text
files, they will almost always write DOS/Win32 style text files.

marcus hall
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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