Sha*_*dra 2 bash scripting
我想grep目录中的多个文件,并在一个单独的文件中收集每个grep的输出.所以,如果我grep 20个文件,我应该得到20个包含搜索项目的输出文件.任何人都可以帮我吗?谢谢.
Gre*_*ill 8
使用for声明:
for
for a in *.txt; do grep target $a >$a.out; done
归档时间:
16 年,7 月 前
查看次数:
1131 次
最近记录: