tr '[z-a]' '[a-z]' yields error message
문제
I want to emulate rev
command (on alphabet) with the tr
command
So I did this
echo abcdefghijklmnopqrstuvxyz | tr '[z-a]' '[a-z]'
That gives me
tr: range-endpoints of `z-a' are in reverse collating sequence order
So I tried
echo abcdefghijklmnopqrstuvxyz | tr 'abcdefghijklmnopqrstuvxyz' 'zyxvutsrqponmlkjihgfedcba'
and it works ok, output is zyxvutsrqponmlkjihgfedcba
That is wrong with tr '[z-a]' '[a-z]'
?
If I specify tr '[a-c]' '[c-a]'
it also works fine.
Any help would be appreciated
Thank you
올바른 솔루션이 없습니다
제휴하지 않습니다 StackOverflow