1,首先有一個文件data
tao@debian6:~$ cat data
hello hello about is
is is are you ok be
yes no NO are are
jerry jerry jerry JERRY
She's my girlfriend
2,創建一個管道線,顯示所有的雙單詞,如hello hello
tao@debian6:~$ cat data | tr -cs [:alpha:]\' "\n" |uniq -c |grep 2|awk '{print $2}'
hello
are
本文出自 「jerrymin」 博客,請務必保留此出處http://jerrymin.blog.51cto.com/3002256/852486