我想在WhatsApp会话(作为txt文件转储)中搜索任何包含字符串“我将告诉您妈妈”的消息以及前面的消息。
然而,我需要能够匹配搜索字符串的变化,例如:-告诉您的妈妈!!- tell给您的妈妈!
如果前面一行出现相同的措辞,也应将其视为相同。
发布于 2016-07-19 17:24:45
grep就是为此而建的。
若要搜索case_-i_n敏感,并返回1行_B_efore,请使用类似于
grep -i -B1 tell\ to\ your\ mom your_msg_dump_with_each_msg_on_seperate_line.txt
https://unix.stackexchange.com/questions/296921
复制相似问题