From: Eric Blake Date: Sat, 26 Apr 2008 12:32:19 +0000 (-0600) Subject: Mention Solaris /usr/ucb/tr pitfall. X-Git-Tag: v2.63~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c242f622dcbd6a9c467fe9213254d7ffac3535f3;p=thirdparty%2Fautoconf.git Mention Solaris /usr/ucb/tr pitfall. * doc/autoconf.texi (Limitations of Usual Tools) : Add section. Reported by Bruno Haible and Jim Meyering. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index fad30e750..705e71eef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-04-26 Eric Blake + + Mention Solaris /usr/ucb/tr pitfall. + * doc/autoconf.texi (Limitations of Usual Tools) : Add section. + Reported by Bruno Haible and Jim Meyering. + 2008-04-24 Eric Blake Mention m4sugar's internal quote strings. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index ff7ffc7dc..a5e880ac1 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -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