2

当我键入此命令时:

$ echo 1234567890 | tr '9-0' '9876'

它说“tr:'9-0'的范围端点是反向整理顺序”。这是什么意思?这是否意味着我只能输入“0-9”?

4

1 回答 1

5

Yes, that's exactly what it means. '9-0' isn't a range, anymore than 'z-a' is a range. Otherwise, how does it know whether you mean 0-9 or the entire unicode range starting from 9, going to the top of the range and wrapping around back to 0?

于 2013-08-24T02:40:28.720 回答