当前位置: 动力学知识库 > 问答 > 编程问答 >

How do you match CJK filenames in BASH?

问题描述:

I first attempted:

[$'\u4E00'-$'\u9FCC']

# Remember, if you, for example, specify [c-a]

# you will not get a range.

but only to realize that range is defined by collation order, not by their code points.

We also need to keep in mind that CJK characters are sorted by stroke count, then by radical.

So if we have a directory containing files, with some named using Latin characters and others named using CJK, and we want to manipulate those whose names are in CJK, how can we achieve this in BASH?

分享给朋友:
您可能感兴趣的文章:
随机阅读: