[root@redhat ~]# export LANG=zh_CN.GB18030
[root@redhat ~]# grep [A-Z]om law
Anyway, Tom, I need your help. I'd like to make the test up
think you could help me? After work, about 7 PM,come to
[root@redhat ~]# export LANG=zh_CN.UTF-8
[root@redhat ~]# grep [A-Z]om law
Anyway, Tom, I need your help. I'd like to make the test up
think you could help me? After work, about 7 PM,come to
[root@redhat ~]# export LANG=en_US
[root@redhat ~]# grep [A-Z]om law
Anyway, Tom, I need your help. I'd like to make the test up
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/37724/viewspace-152577/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/37724/viewspace-152577/
本文通过一个具体的案例展示了如何在Linux环境下设置不同的语言环境变量并利用grep命令进行字符串匹配。该过程涉及到了导出语言环境变量以及使用大小写敏感的正则表达式。
1万+

被折叠的 条评论
为什么被折叠?



