Quote:
Originally Posted by
Corona688
Probably a character-set thing.
...<snip>...
Also, if you have a file in your directory named :, l, o, w, e, r, u, or p, [:lower:] and [:upper:] will actually glob those filenames, so put them in single quotes! '[:lower:]' '[:upper:]'
I believe the globbing is the problem. If
[:lower:] matches a filename, the lower case x won't appear in the first argument to tr and will not be converted.
The issue with locales which interleave upper and lower case letters (such as english utf-8) typically manifests as unintended conversions.
I would suggest, as you did, to quote the arguments to tr. For confirmation,
set -x.
Regards,
Alister