sed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sed+windows/cygwin+newlines: improving documentation


From: Eli Zaretskii
Subject: Re: sed+windows/cygwin+newlines: improving documentation
Date: Wed, 10 Oct 2018 06:20:15 +0300

> Cc: address@hidden, address@hidden
> From: Assaf Gordon <address@hidden>
> Date: Tue, 9 Oct 2018 13:59:29 -0600
> 
> > I just skimmed the recent sources, but according to what I see, it
> > sounds like -b only affects writing with the 'w' and 'W' commands, I
> > don't see where Sed switches its standard output to binary mode.  Did
> > I miss something?
> 
> Correct, with the addition of -i/--inplace option should also respect
> the write_mode when the temporary file is created:
> https://opengrok.housegordon.com/source/xref/sed/sed/execute.c#617
> 
> STDOUT is not affected in any case.

OK, then this explains why the output from Sed always produces CRLF
Windows EOL format.  The Sed manual clearly says:

  When [the -b] option is specified, @command{sed} will open
  input files in binary mode, thus not requesting this special processing
  and considering lines to end at a line feed.

Note the "input files" part.  So it sounds like the --help output
could use some update, to say the same.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]