[prev in list] [next in list] [prev in thread] [next in thread] 

List:       coreutils-bug
Subject:    bug#11991: tr bug
From:       "Xiao, Bellon (NSN - CN/Cheng Du)" <bellon.xiao () nsn ! com>
Date:       2012-07-19 6:38:55
Message-ID: DFA233D11DAE9F43A7914641340C5D4D03885414 () CNBEEXC007 ! nsn-intra ! net
[Download RAW message or body]

Hi,

We found a bug of tr, the version is tr (coreutils) 5.2.1
Here is the symptom:
When there is a file named e or r under current directory, tr will take effect£¬like£º
	echo hello |tr [a-z] [A-Z] 
	echo hello |tr [:lower:] [:upper:]
will return hello

And when is a file named l, o, p, u or w under current directory, tr will give error message like:
	echo hello |tr [a-z] [A-Z] 
	echo hello |tr [:lower:] [:upper:]
gives : tr: misaligned [:upper:] and/or [:lower:] construct


But if you try 
	echo kkhh |tr "[a-z]" "[A-Z]" 
	echo kkhh |tr "[:lower:]" "[:upper:]"
There will be no error and it takes effect.

Brs
Bellon Xiao


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic