开发者

I would like to pipe a list of files from a text file to prune from a find command

I have a script which I pass a list of files to exclude from a spider function.

The problem is I have a list of files I want to include in the spider. Rather than rewrite the function to also allow passing in a list of files I want to include I would like to pull a list of all files in the directory and then remove the list of files I want to include from it.

So my thought was to do a find of the directory and pipe in the list of files I want to include to prune out of the list so I have a list of files to exclude.

This sounds confusing, and there is probably a开发者_运维知识库 better way to do it, but this is my first idea.


Maybe what you need is to sort the list of all files into file.1, sort the list of files to be excluded into file.2, and then use comm -23 file.1 file.2 to generate the files that can be allowed out.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜