X-Spam-Check-By: sourceware.org Subject: Re: tr command suddenly behaves differently From: Jim Easton To: cygwin AT cygwin DOT com Date: Sun, 24 Sep 2006 01:02:23 -0600 (MDT) CC: Jim Easton X-Mailer: ELM [version 2.4ME+ PL66 (25)] Message-Id: 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 Hi, > According to Logu on 9/23/2006 4:46 AM: > > After analysing I found that the tr command did not work correctly. So > > the command > > $ /usr/bin/tr [:upper:] [:lower:] Sat, 23 Sep 2006 Eric Blake wrote > There's your problem. You didn't quote properly. Try: > $ echo [:upper:] [:lower:] > to see what you were really invoking, then try: > $ tr '[:upper:]' '[:lower:]' > to do what you meant. 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' HTH Jim -- 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/