Macos 什么';tr命令中-C和-C的区别是什么?
从手册页Macos 什么';tr命令中-C和-C的区别是什么?,macos,tr,bsd,Macos,Tr,Bsd,从手册页 -C Complement the set of characters in string1, that is ``-C ab'' includes every character except for `a' and `b'. -c Same as -C but complement the set of values in string1. 不确定字符集和值集之间是否有差异,但这两个选项似乎给出相同的输出 $ echo abc123 | tr -Cd
-C Complement the set of characters in
string1, that is ``-C ab'' includes
every character except for `a' and `b'.
-c Same as -C but complement the set of
values in string1.
不确定字符集
和值集
之间是否有差异,但这两个选项似乎给出相同的输出
$ echo abc123 | tr -Cd [:digit:] # 123
$ echo abc123 | tr -cd [:digit:] # 123
我在macOS 10.12.4上运行这个程序