如何将削减选项-b和-c成为国际化的不同 [英] How will cut options -b and -c become different with Internationalization

查看:149
本文介绍了如何将削减选项-b和-c成为国际化的不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

`-b BYTE-LIST'
`--bytes=BYTE-LIST'
     Select for printing only the bytes in positions listed in
     BYTE-LIST.  Tabs and backspaces are treated like any other
     character; they take up 1 byte.  If an output delimiter is
     specified, (see the description of `--output-delimiter'), then
     output that string between ranges of selected bytes.

`-c CHARACTER-LIST'
`--characters=CHARACTER-LIST'
     Select for printing only the characters in positions listed in
     CHARACTER-LIST.  The same as `-b' for now, but
     internationalization will change that.  Tabs and backspaces are
     treated like any other character; they take up 1 character.  If an
     output delimiter is specified, (see the description of
     `--output-delimiter'), then output that string between ranges of
     selected bytes.

-c 描述说:同为`-b现在,但国际化将改变

我假定某些语言的国际化的字符可能多字节字符,那就是当 -c -b 将表现differently..correct?

I am assuming Internationalized characters for some languages could have multi-byte characters and that is when -c and -b will behave differently..correct?

推荐答案

是的。让我们做一个试验:

Yes. Let's do a test:

$ cat a
200
bést
203
-Ümlaut
$ cut -b2-3 a
00
é           <---- é has 2 bytes
03
Ü           <---- Ü has 2 bytes
$ cut -c2-3 a
00
és
03
Üm

这篇关于如何将削减选项-b和-c成为国际化的不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆