]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Mention Solaris /usr/ucb/tr pitfall.
authorEric Blake <ebb9@byu.net>
Sat, 26 Apr 2008 12:32:19 +0000 (06:32 -0600)
committerEric Blake <ebb9@byu.net>
Sat, 26 Apr 2008 12:34:24 +0000 (06:34 -0600)
* doc/autoconf.texi (Limitations of Usual Tools) <tr>: Add section.
Reported by Bruno Haible and Jim Meyering.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
doc/autoconf.texi

index fad30e7505bc6eec74cb5b1f1961ce603bff9ef8..705e71eef0e4937ba0c4e322e8111bfa33941c7c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-26  Eric Blake  <ebb9@byu.net>
+
+       Mention Solaris /usr/ucb/tr pitfall.
+       * doc/autoconf.texi (Limitations of Usual Tools) <tr>: Add section.
+       Reported by Bruno Haible and Jim Meyering.
+
 2008-04-24  Eric Blake  <ebb9@byu.net>
 
        Mention m4sugar's internal quote strings.
index ff7ffc7dc77a8df8864f8e50026cd9357a020f9f..a5e880ac198360848705f1608be55a8601951bef 100644 (file)
@@ -15607,6 +15607,28 @@ fails to work on SunOS 4.1.3 when the empty file is on an
 @acronym{NFS}-mounted 4.2 volume.
 However, these problems are no longer of practical concern.
 
+@item @command{tr}
+@c ---------------
+@prindex @command{tr}
+@cindex carriage return, deleting
+@cindex deleting carriage return
+Not all versions of @command{tr} handle all backslash character escapes.
+For example, Solaris 10 @command{/usr/ucb/tr} falls over, even though
+Solaris contains more modern @command{tr} in other locations.
+Therefore, it is more portable to use octal escapes, even though this
+ties the result to @acronym{ASCII}, when using @command{tr} to delete
+newlines or carriage returns.
+
+@example
+$ @kbd{@{ echo moon; echo light; @} | /usr/ucb/tr -d '\n' ; echo}
+moo
+light
+$ @kbd{@{ echo moon; echo light; @} | /usr/bin/tr -d '\n' ; echo}
+moonlight
+$ @kbd{@{ echo moon; echo light; @} | /usr/ucb/tr -d '\012' ; echo}
+moonlight
+@end example
+
 @end table