autoconf-patches
[Top][All Lists]
Advanced

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

Re: tr portability


From: Ralf Wildenhues
Subject: Re: tr portability
Date: Mon, 28 Apr 2008 23:12:38 +0200
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

Hi Eric,

* Eric Blake wrote on Sat, Apr 26, 2008 at 02:35:12PM CEST:
> * doc/autoconf.texi (Limitations of Usual Tools) <tr>: Add section.
> Reported by Bruno Haible and Jim Meyering.

> +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.

If you list tr, I'd be inclined to think that the range issue (a-z vs.
[a-z]) should be listed as well.

> address@hidden
> +$ @address@hidden echo moon; echo light; @} | /usr/ucb/tr -d '\n' ; echo}
> +moo
> +light

This is missing a newline at the end, no?

> +$ @address@hidden echo moon; echo light; @} | /usr/bin/tr -d '\n' ; echo}
> +moonlight
> +$ @address@hidden echo moon; echo light; @} | /usr/ucb/tr -d '\012' ; echo}
> +moonlight
> address@hidden example
> +
>  @end table

Cheers,
Ralf




reply via email to

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