* FW: tr command suddenly behaves differently
@ 2006-09-25 12:32 Dave Korn
0 siblings, 0 replies; only message in thread
From: Dave Korn @ 2006-09-25 12:32 UTC (permalink / raw)
To: Thread TITTTL'd!
On 24 September 2006 14:38, Eric Blake wrote:
> According to Jim Easton on 9/24/2006 1:02 AM:
>> Pardon me for putting my oar in but the syntax of tr varies quite a
>> bit from system to system. It has been my experience that the only
>> reliable way of expressing the above so that it will work on cygwin,
>> linux, solaris, sun4, aix and irix is the following. It's probably more
>> efficient to boot :-).
>>
>> tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'
>
> More reliable, yes; in fact, this is what autoconf uses under the hood for
> constructs like AS_TR_SH. But POSIX requires tr and sed to understand
> [:upper:] and [:lower:], and to understand it in the context of the
> current locale (there are some locales where blindly using the 26 letters
> of English is the wrong behavior, and where you really do mean [:upper:]).
Of course, the *real* reason not to use "tr [A-Z] [a-z]" is for EBCDIC
compatibility...
tr 'ABCDEFGHI ôöòóõ}JKLMNOPQR¹ûüùúÿ\÷STUVWXYZ' \
'abcdefghi«»ðýþ±°jklmnopqrªºæ¸Æ¤µ~stuvwxyz'
That's gotta hurt your umlauts...
cheers,
DaveK
--
Can't think of a witty .sigline today....
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-09-24 14:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-25 12:32 FW: tr command suddenly behaves differently Dave Korn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).