Subject: RE: echo is wrong...
From: [email-masked] (Bob McGowan)

10 Apr 1998 06:36:34 -0700
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain
To: Sergey Okhapkin <[email-masked]>
Cc: [email-masked]

Sergey,

Having _bash_ force pipes to be text mode seems to me to be "incorrect".
I would think that the user would prefer a binary mode, so that it does
not matter what is input and the output matches.  Is there something
wrong with this idea?  Are there implementation issues, perhaps?

Thanks,

----
Bob McGowan
i'm bobmcgow at xstor dot com
Storage Dimensions, Inc.

-----Original Message-----
From: Sergey Okhapkin [mailto:[email-masked]]
Sent: Tuesday, April 07, 1998 9:04 PM
To: [email-masked]; [email-masked]'
Subject: RE: echo is wrong...

[email-masked] 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
"[email-masked]" with one line of text: "help".
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".