Mail Archives: djgpp/2009/05/02/07:30:55

X-Authentication-Warning: mail set sender to djgpp-bounces using -f
From: Rugxulo <rugxulo AT gmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: GNU sed: (forced?) automatic LF conversion
Date: Sat, 2 May 2009 04:29:57 -0700 (PDT)
Lines: 28
Message-ID: <>
References: <5641189d-c2ac-426a-b9d5-b6686ed55ac6 AT p6g2000pre DOT googlegroups DOT com>
<838wlhdzbj DOT fsf AT gnu DOT org>
Mime-Version: 1.0
X-Trace: 1241263797 3466 (2 May 2009 11:29:57 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Sat, 2 May 2009 11:29:57 +0000 (UTC)
Complaints-To: groups-abuse AT google DOT com
Injection-Info:; posting-host=;
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:
Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com


On May 1, 3:04=A0am, Eli Zaretskii <e DOT  DOT  DOT  AT gnu DOT org> wrote:
> > From: Rugxulo <rugx DOT  DOT  DOT  AT gmail DOT com>
> > Date: Thu, 30 Apr 2009 15:08:03 -0700 (PDT)
> > =A0 =A0Just curious if anyone knows why the DJGPP port of GNU sed *alwa=
> > changes a *nix LF text file into DOS CR+LF? Not a huge deal, but I can
> > imagine some rare cases it wouldn't be convenient. (In any case it's
> > unexpected, but since we're in DOS anyways ....) I wonder if this is
> > intentional or just the libc doing this or what.
> It's intentional, in the sense that the person who ported Sed
> deliberately decided not to use binary-mode output, for the reason
> pointed out by DJ.
> There are scripts and batch files out there that rely on the fact that
> the following command converts a Unix-style text file to a DOS-style
> file:
> =A0 =A0 =A0 =A0 sed -e '' < unix.txt > dos.txt

Well, that's fine, and I was aware of that, just thought it was bad
manners to change a file without asking.   ;-)
It's not the end of the world, esp. since we have dtou and utod (which
should be combined, IMHO). Just that some tools still can't handle one
or the other, so you have to be careful.

- Raw text -

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