Independent Blog Address: http://cxh.me/2015/01/05/a-word-puzzle/
The origins are such a topic:
So I thought of word dict to calculate:
First to download the Chinese thesaurus:
git clone [email protected].com:ling0322/webdict.git
Then remove the word frequency information:
awk ‘{ if (length($1)==2) print $1}‘ webdict_with_freq.txt >webdict.txt
Filter the candidate set by the occurrence position first, and remove the big/day/wind/think four characters:
grep' ^ Big. 'webdict.txt|sed' s/big//g ' >da.Txtgrep' ^ th. * 'webdict.txt|sed' s/Day//g ' >RI.Txtgrep'. * Wind $ 'webdict.txt|sed' s/wind//g ' >Feng.Txtgrep'. * Think $ 'webdict.txt|sed' s/think//g ' >si.txt
After the thing is very interesting, each join two files, because the big/day/wind/think four words are no intersection, so the result is the required word:
Comm- A < (Sort da.txt|Uniq) < (sort Ri.txt|Uniq) >Da_ri.Txtcomm- A < (Sort Feng.txt|Uniq) < (Sort Da_ri.txt|Uniq) >Da_ri_feng.Txtcomm- A < (sort Si.txt|Uniq) < (Sort Da_ri_feng.txt|Uniq) >Da_ri_feng_si.txt
The last murderer has only one answer:
Thank you for watching ~.
Reference documents:
[1] LINUX Shell for two file intersection and differential set method, http://blog.csdn.net/autofei/article/details/6579320
From the title of a word game