opH*_*AME 4 grep io-redirection filenames
我有一个纯文本文件,每一行都是文件的路径。现在我必须grep
在这些文件中查找字符串。
有什么方法可以使用此文件作为“搜索源”吗grep
?或者我是否必须复制并粘贴 bash 的每个路径?
第二:有没有办法grep
在一行中提供不同的文件作为搜索源?喜欢
egrep --color -i "test" /tmp/1.txt, /tmp/2.txt
...?
关于什么
fgrep <pattern> `cat file_list.txt`
Run Code Online (Sandbox Code Playgroud)
注意添加正确的引号“而不是”——如果我明白你想要做什么