06-29-2005
203,
0
Join Date: Apr 2005
Last Activity: 15 April 2011, 1:11 AM EDT
Location: Bangalore, India
Posts: 203
Thanks Given: 0
Thanked 0 Times in 0 Posts
TR : surprises me
I am not able to see why tr is behaving surprisingly strange.
I am pasting the commands and output. see if anyone can explain the mystery.
arbhvp02% echo "p-20050608-Ajyd-g.jpg" | tr "p-20050608-A'[a-z]'-g.jpg" "p-20050608-A'[A-Z]'-g.jpg"
p-20050608-AjYD-g.jpg
arbhvp02% echo "p-20050608-Ajjyd-g.jpg" | tr "p-20050608-A'[a-z]'-g.jpg" "p-20050608-A'[A-Z]'-g.jpg"
p-20050608-AjjYD-g.jpg
arbhvp02% echo "p-20050608-Axyd-g.jpg" | tr "p-20050608-A'[a-z]'-g.jpg" "p-20050608-A'[A-Z]'-g.jpg"
p-20050608-AXYD-g.jpg
arbhvp02% echo "p-20050608-Abyd-g.jpg" | tr "p-20050608-A'[a-z]'-g.jpg" "p-20050608-A'[A-Z]'-g.jpg"
p-20050608-ABYD-g.jpg
arbhvp02% echo "p-20050608-Abjyd-g.jpg" | tr "p-20050608-A'[a-z]'-g.jpg" "p-20050608-A'[A-Z]'-g.jpg"
p-20050608-ABjYD-g.jpg
Please see the bold parts, whenever I give j it is noever translated to upper case.
Want to know why it treats j so differently.
Regards,
Rishi