I'm trying to test the limits of the tr command using character ranges. What I don't get is how come I get the output:
echo "lowercase letters" | tr A-Z A-Z
My locale is set to dictionary order aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ. In principle, the "a" in "lowercase letters" shouldn't be changed, since "a" comes before "A". The thing I don't get is how come the other letters in "lowercase letters" aren't capitalized? Shouldn't they all be capitalized given that they are all located between "A" and "Z" in dictionary order?
echo "lowercase letters" | LC_ALL=C tr A-Z A-ZDoes that give the same output ?
A-Zdoesn't expand the dictionary order. It expands to all ascii characters from A to Z. Since in
lowercase lettersthere's no capitals, nothing gets changed