This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tr command suddenly behaves differently


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.

My guess is that you have a file in your home directory that uses a single
letter, so the bracket expansion of bash took effect and expanded to that
filename rather than passing through the regex that you thought you typed.


Thanks I had a filename "l" which was giving trouble.


By the way, none of this is cygwin specific.


The /etc/profile had this code hence I thought it is bug in the cygwin system. May be this is fixed in the newer versions.
-----------------------------
case "`echo "$0" | /usr/bin/tr [:upper:] [:lower:]`" in
bash | -bash | */bash | \
bash.exe | -bash.exe | */bash.exe )
# Set a HOSTNAME variable
HOSTNAME=`hostname`
export HOSTNAME


-----------------------------

Thanks
-logu




-- 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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]