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


marcus@bighorn.dr.lucent.com wrote:
> > 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.
> 

You're wrong. B19 _bash_ forces pipes to be text mode. Try the same in ash and feel the difference.

-- 
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia


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