[root@db01 local]# find -name '*.com'|xargs egrep "qq"
./tt.com:qq
[root@db01 local]# find -name '*.com'
./tt1.com
./tt.com
[root@db01 local]# find -name '*.com'|xargs egrep qq
./tt.com:qq
[root@db01 local]# cat tt.com
qq
[root@db01 local]# egrep "qq" `find ./ -name '*.com'`
./tt.com:qq
转载于:https://www.cnblogs.com/gaoyuechen/p/8412962.html