delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/01/19/11:17:56

Date: Wed, 19 Jan 94 16:39:29 +0100
From: kuku AT acds DOT physik DOT rwth-aachen DOT de (Christoph Kukulies)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: crlf issue

I'm a bit puzzled at the moment by the following:

When I write out like: main() { putchar('\n'); }  I write a signle LF
to stdout. Redirecting this to a file produces CRLF. OK. 

I accept this (though it's odd). When I then do a

cat thatfile | tr -d "\015" "" >another and then dump that file
I have a sole 0x0a in the file (looking at using od). (tr was one of the
textutils ported once by Eric Backus).

I wonder if there is a way to open stdout in binary mode or some such
allowing to suppress this LF postprocessing.

--Chris
----------------------------------------------------------------------------
Christoph P. U. Kukulies                 | BIX: chriskuku AT bix DOT com
kuku AT acds DOT physik DOT rwth-aachen DOT de          | CIS: 73007,1525
*** Error code 1

Stop.

- Raw text -


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