Grep不起作用

时间:2016-05-25 10:36:51

标签: macos terminal grep

我在mac终端上遇到GREP的奇怪行为。

我有一个要在另一个文件中搜索的ID列表。我的ID位于cluster_1.txt。我想从另一个文件1.2FoldRegulatedIn6Samples_normFC_no102.txt

中获取所有这些ID

ID文件和目标文件包含ID "CDK17"

grep CDK17 cluster_1.txt 

grep CDK17 1.2FoldRegulatedIn6Samples_normFC_no102.txt

以上命令都告诉我它们包含ID。但是当我做的时候

 grep -w -F -f cluster_1.txt 1.2FoldRegulatedIn6Samples_normFC_no102.txt | grep "CDK17" 

我没有得到任何结果。它非常奇怪,我不知道它为什么会发生。

0 个答案:

没有答案