开发者

Comparing with a Blacklist and saving the output

I have 2 text files, the source list, and a "black list", which it'll compare against the source list (case insensitive) and if any lines is detected with any of the blacklist lines, make a "3rd list" (output) of the offending items and line numbers (of the source file).

Sour开发者_如何学编程ce List Example:

*cat
##dog
.pig
$qwer
|cup|
*coke*
^clock^


Give this a try:

grep -Finf blklst srclst
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜