X-Spam-Check-By: sourceware.org Message-ID: <45168A4B.6080804@byu.net> Date: Sun, 24 Sep 2006 07:38:19 -0600 From: Eric Blake User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.666 MIME-Version: 1.0 To: cygwin AT cygwin DOT com, jim AT cs DOT ualberta DOT ca Subject: Re: tr command suddenly behaves differently References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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:]). - -- Life is short - so eat dessert first! Eric Blake ebb9 AT byu DOT net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFFopL84KuGfSFAYARAtZFAKCtFXVcVP7t1TITCcLmq3jwwB/LOACfSlYt 4YBAWjE0zmq2z5CYHubeAxI= =sPT1 -----END PGP SIGNATURE----- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/