Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2010-03-27 08:26:51 +0300
committerChristopher Faylor <me@cgf.cx>2010-03-27 08:26:51 +0300
commitcf989df66aea7b7a6d50867f00d1d78103a64bee (patch)
tree9792a222d284c9c922f6b3d31ffd9090ace4baac
parent86a58929ba3820da7f14f508056a5540fd081425 (diff)
* textbinary.sgml: Remove tr example and just mention u2d and d2u instead.
-rw-r--r--winsup/doc/ChangeLog5
-rw-r--r--winsup/doc/textbinary.sgml39
2 files changed, 9 insertions, 35 deletions
diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog
index c97297a47..b30a52d4a 100644
--- a/winsup/doc/ChangeLog
+++ b/winsup/doc/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-27 Christopher Faylor <me+cygwin@cgf.cx>
+
+ * textbinary.sgml: Remove tr example and just mention u2d and d2u
+ instead.
+
2010-03-25 Christopher Faylor <me+cygwin@cgf.cx>
* pathnames.sgml: Clarify wording of user-specific fstab files. Fix
diff --git a/winsup/doc/textbinary.sgml b/winsup/doc/textbinary.sgml
index 055a5e012..bb49d411d 100644
--- a/winsup/doc/textbinary.sgml
+++ b/winsup/doc/textbinary.sgml
@@ -68,45 +68,14 @@ Non-Cygwin shells always pipe and redirect with binary mode. With
non-Cygwin shells the commands <command> cat filename | program </command>
and <command> program &lt; filename </command> are not equivalent when
<filename>filename</filename> is on a text-mounted partition. </para>
+<para>The programs <command>u2d</command> and <command>d2u</command> can
+be used to add or remove CR's from a file. <command>u2d</command> add's CR's before a NL.
+<command>d2u</command> removes CR's. Use the --help option to these commands
+for more information.
</listitem>
</orderedlist>
</sect2>
-<sect2 id="textbin-example"><title>Example</title>
-<para>To illustrate the various rules, we provide scripts to delete CRs
-from files by using the <command>tr</command> program, which can only write
-to standard output.
-The script</para>
-<screen>
-<![CDATA[
-#!/bin/sh
-# Remove \r from the file given as argument
-tr -d '\r' < "$1" > "$1".nocr
-]]>
-</screen>
-<para> will not work on a text mounted systems because the \r will be
-reintroduced on writing. However scripts such as </para>
-<screen>
-<![CDATA[
-#!/bin/sh
-# Remove \r from the file given as argument
-tr -d '\r' | gzip | gunzip > "$1".nocr
-]]>
-</screen>
-<para>and the .bat file</para>
-<screen>
-<![CDATA[
-REM Remove \r from the file given as argument
-@echo off
-tr -d \r < %1 > %1.nocr
-]]>
-</screen>
-<para> work fine. In the first case we rely on <command>gunzip</command> to
-set its output to binary mode, possibly overriding the mode used by the shell.
-In the second case we rely on the DOS shell to redirect in binary mode.
-</para>
-</sect2>
-
<sect2 id="textbin-question"><title>Binary or text?</title>
<para>UNIX programs that have been written for maximum portability