delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/11/09/01:29:42

Date: Fri, 09 Nov 2001 08:24:53 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: Robert Neinast <neinast AT worldnet DOT att DOT net>
Message-Id: <8011-Fri09Nov2001082452+0200-eliz@is.elta.co.il>
X-Mailer: emacs 21.1.50 (via feedmail 8 I) and Blat ver 1.8.9
CC: djgpp AT delorie DOT com
In-reply-to: <MPG.1654b32b33937e91989692@netnews.worldnet.att.net> (message
from Robert Neinast on Thu, 08 Nov 2001 20:19:04 GMT)
Subject: Re: Can't Even Read File Correctly
References: <MPG DOT 165491792e225e13989690 AT netnews DOT worldnet DOT att DOT net> <9sei6v$8j9$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <MPG DOT 1654a7511c522106989691 AT netnews DOT worldnet DOT att DOT net> <MPG DOT 1654b32b33937e91989692 AT netnews DOT worldnet DOT att DOT net>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: Robert Neinast <neinast AT worldnet DOT att DOT net>
> Newsgroups: comp.os.msdos.djgpp
> Date: Thu, 08 Nov 2001 20:19:04 GMT
> 
> One more question: Is there any way to start up bash so that
> the default is "binary", not "text" mode

No.  Bash has nothing to do with this: each program needs to to set
the text/binary mode by itself, because the CRLF -> LF conversions
are done by the library, not by the OS.  So the text/binary mode
cannot be inherited to child processes, and therefore Bash cannot
force the programs it runs into some specific mode.

> It really annoys me that programs like
> ls, wc, and od count those \r\n when its only \n that's there
> (i.e., they give false counts).

Hm??  Those \r\n pairs _are_ there in the file, wc doesn't invent
them.  Try running a file through dtou, and you will see that wc
reports rediced counts, and the file's size on disk also gets smaller.
wc reads its files in binary mode.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019