grep 小文件中的名称与大文件匹配
我的小文件逐行包含此信息:
abc.123
abc.258
abc.952
我想让这些行在我的大文件(~30Gb)中匹配。我尝试了这个命令,但它没有给我任何结果。
grep -f small.txt big.txt
我已经测试了所有 abc.123
、abc.258
和 abc.952
确实存在于我的较大文件中,这意味着我尝试 grep 每个这些名字一一列出,它给了我我想要的确切结果。
grep "abc.123" big.txt
我不知道我哪里可能出错?
My small file contains this information line by line:
abc.123
abc.258
abc.952
I wanted to get those lines matching in my bigger file (~30Gb). I tried this command but it didn't give me any result.
grep -f small.txt big.txt
I have tested all abc.123
, abc.258
and abc.952
does exist in my bigger file, meaning that I tried to grep each of these names one by one it gave me the exact result I want.
grep "abc.123" big.txt
I have no idea where I could possibly go wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论