uniq和sort对汉字的识别差异
发布于 2008-03-29 22:56 1 阅读:75,098 评论:1 标签: Linux sort uniq

  在处理文本文件中经常会使用的到sort和uniq命令,组合使用时通常是为了得到文本中共有多少行不同的信息。
 
  比如“sort a.txt | uniq”。这个命令的意识是说先对文本进行行排序,然后把相邻中的相同行的内容只取一行。
 
  然而在实践中发现这两个命令对汉字的支持不一样,解决方法如下:

以下是引用片段:

[yayu@login log_result]$ echo $LANG
en_US.UTF-8
[yayu@login log_result]$ LANG=zh_cn

呵呵

这会儿你们都转到*NUX下面去啦?

by PESoft 2008-04-01 09:57:51
Warning: Trying to access array offset on value of type bool in /opt/bitnami/apache/htdocs/workingsmarty/templates_c/e21e83752348f01f75c472238af0e4512d51cc32_0.file.left_look.html.php on line 154

早转了

站长回复

Warning: Trying to access array offset on value of type bool in /opt/bitnami/apache/htdocs/workingsmarty/templates_c/e21e83752348f01f75c472238af0e4512d51cc32_0.file.left_look.html.php on line 172