我想根据文件名模式列出递归目录中的文件名。
这是我迄今为止开发的代码:
find . -name "*pipeline*" | grep -R 'pipeline'
但是它的输出是:
static/js/angular/angular-scenario.js: * and `$validators` pipelines. If there are no special {@link ngModelOptions} specified then the staged
static/js/angular/angular-scenario.js: * will not invoke the `$parsers` and `$validators` pipelines. For this reason, you should
static/js/angular/angular.js: * * if the value returned from the `$parsers` transformation pipeline has not changed
static/js/angular/angular.js: * @property {Array.<Function>} $parsers Array of functions to execute, as a pipeline, whenever
static/js/angular/angular.js: * @property {Array.<Function>} $formatters Array of functions to execute, as a pipeline, whenever
static/js/angular/angular.js: * and `$validators` pipelines. If there are no special {@link ngModelOptions} specified then the staged
static/js/angular/angular.js: * will not invoke the `$parsers` and `$validators` pipelines. For this reason, you should
social/pipeline.py: print ("at pipeline *******", details, uid, social, kwargs, response)
我期望的结果将是一个带有pipeline的文件名,如下所示:
social/pipeline.py
social/__pycache__/pipeline.cpython-35.pyc
最佳答案
命令
find ./ -type f -print | grep -i pipeline*
输出将是
./social/pipeline.py
./social/__pycache__/pipeline.cpython-35.pyc
关于linux - 如何使用 find 和 grep 列出文件名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46089030/