delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/10/21/22:05:55

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4ADFC176.1060403@gmail.com>
Date: Thu, 22 Oct 2009 03:20:38 +0100
From: Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: gawk Has Problem With CRLF in Mixed Binary/Text Files
References: <640028070 DOT 893481256169650265 DOT JavaMail DOT root AT sz0097a DOT westchester DOT pa DOT mail DOT comcast DOT net>
In-Reply-To: <640028070.893481256169650265.JavaMail.root@sz0097a.westchester.pa.mail.comcast.net>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

t.a.n.s.t.a.a.f.l@ wrote:

> [ ... ] but as can be seen by the attached files, the downloaded 
> gawk executable always changes CRLF to LF, 

  Is this what you're looking for?

> File: gawk.info,  Node: User-modified,  Next: Auto-set,  Up: Built-in Variables
> 
> 6.5.1 Built-in Variables That Control `awk'
> -------------------------------------------
        [ ... snip ... ]
> `BINMODE #'
>      On non-POSIX systems, this variable specifies use of binary mode
>      for all I/O.  Numeric values of one, two, or three specify that
        [ ... snip ... ]
>      but `gawk' generates a warning message.  `BINMODE' is described in
>      more detail in *note PC Using::.
        [ ... snip ... ]

  Or this?

> File: gawk.info,  Node: PC Using,  Next: Cygwin,  Prev: PC Dynamic,  Up: PC Ins\
> tallation
> 
> B.3.3.4 Using `gawk' on PC Operating Systems
> ............................................
        [ ... snip ... ]
>    Under OS/2 and DOS, `gawk' (and many other text programs) silently
> translate end-of-line `"\r\n"' to `"\n"' on input and `"\n"' to
> `"\r\n"' on output.  A special `BINMODE' variable allows control over
> these translations and is interpreted as follows:
        [ ... continues ... ]


    cheers,
      DaveK


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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