gpt4 book ai didi

linux - 为什么 grep -vFf png.ll png.lll 不同于 grep -vFf png.lll png.ll?

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:01:18 26 4
gpt4 key购买 nike

$ cat png.ll
./packages/apps/Mms/res/mipmap-hdpi/ic_launcher_smsmms.png
./packages/apps/Mms/res/drawable-hdpi/messagebox_pressed_left.9.png
./packages/apps/Mms/res/drawable-hdpi/messagebox_pressed_right.9.png
./packages/apps/Mms/res/drawable-hdpi/messagebox_default_left.9.png
./packages/apps/Mms/res/drawable-hdpi/messagebox_default_right.9.png
./packages/apps/Mms/res/drawable-hdpi-finger/ic_contact_list_sim2.png
./packages/apps/Mms/res/drawable-hdpi-finger/ic_contact_list_sim1.png

$ cat png.lll
./packages/apps/Mms/res/drawable-hdpi-finger/ic_contact_list_sim2.png
./packages/apps/Mms/res/drawable-hdpi-finger/ic_contact_list_sim1.png

grep -Ff png.ll png.lll 的结果与grep -Ff png.lll png.ll 的结果相同

$ grep -Ff png.ll png.lll
./packages/apps/Mms/res/drawable-hdpi-finger/ic_contact_list_sim2.png
./packages/apps/Mms/res/drawable-hdpi-finger/ic_contact_list_sim1.png

$ grep -Ff png.lll png.ll
./packages/apps/Mms/res/drawable-hdpi-finger/ic_contact_list_sim2.png
./packages/apps/Mms/res/drawable-hdpi-finger/ic_contact_list_sim1.png

但是grep -vFf png.lll png.ll的结果和grep -vFf png.ll png.lll的结果不同

$ grep -vFf png.lll png.ll
./packages/apps/Mms/res/mipmap-hdpi/ic_launcher_smsmms.png
./packages/apps/Mms/res/drawable-hdpi/messagebox_pressed_left.9.png
./packages/apps/Mms/res/drawable-hdpi/messagebox_pressed_right.9.png
./packages/apps/Mms/res/drawable-hdpi/messagebox_default_left.9.png
./packages/apps/Mms/res/drawable-hdpi/messagebox_default_right.9.png

$ grep -vFf png.ll png.lll

为什么?为什么最后一个 grep 没有给出任何输出?

最佳答案

您正在运行四个不同的命令,它们返回的结果如下:

# Show me all lines in png.lll that are also in png.ll
grep -Ff png.ll png.lll

# Show me all lines in png.ll that are also in png.lll
grep -Ff png.lll png.ll

# Show me all lines in png.ll that are *not* in png.lll
grep -vFf png.lll png.ll

# Show me all lines in png.lll that are *not* in png.ll
grep -vFf png.ll png.lll

希望这能解决问题

关于linux - 为什么 grep -vFf png.ll png.lll 不同于 grep -vFf png.lll png.ll?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19782096/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com