This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: tr command suddenly behaves differently
- From: Jim Easton <jim at cs dot ualberta dot ca>
- To: cygwin at cygwin dot com
- Cc: Jim Easton <jim at cs dot ualberta dot ca>
- Date: Sun, 24 Sep 2006 01:02:23 -0600 (MDT)
- Subject: Re: tr command suddenly behaves differently
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/