+2010-04-26 Eric Blake <eblake@redhat.com>
+
+ Clarify octal escapes with tr.
+ * doc/autoconf.texi (Limitations of Usual Tools): Carriage return
+ is portable in octal, but not newline.
+
2010-04-22 Joel James Adamson <joel@chondestes.bio.unc.edu> (tiny change)
Add a paragraph to FAQ on Debugging configure scripts.
@c ---------------
@prindex @command{tr}
@cindex carriage return, deleting
+@cindex newline, 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 ASCII, when using @command{tr} to delete
-newlines or carriage returns.
+Using octal escapes is more portable for carriage returns, since
+@samp{\015} is the same for both ASCII and EBCDIC, and since use of
+literal carriage returns in scripts causes a number of other problems.
+But for other characters, like newline, using octal escapes ties the
+operation to ASCII, so it is better to use literal characters.
@example
$ @kbd{@{ echo moon; echo light; @} | /usr/ucb/tr -d '\n' ; echo}
moonlight
$ @kbd{@{ echo moon; echo light; @} | /usr/ucb/tr -d '\012' ; echo}
moonlight
+$ @kbd{nl='}
+@kbd{'; @{ echo moon; echo light; @} | /usr/ucb/tr -d "$nl" ; echo}
+moonlight
@end example
Not all versions of @command{tr} recognize ranges of characters: at