找出文件中包含指定字段的文件的shell脚本
2026-01-17 16:09:11 作者:用户投稿
复制代码 代码如下:
#!/bin/bash
find / -name "*.php" > list.txt
f=`cat ./list.txt`
for n in $f
do
r=`egrep 'abc' $n`
if [ ! "$r" = "" ] ; then
echo $n
fi
done
#!/bin/bash
find / -name "*.php" > list.txt
f=`cat ./list.txt`
for n in $f
do
r=`egrep 'abc' $n`
if [ ! "$r" = "" ] ; then
echo $n
fi
done
联络方式:
4008905355
邮箱:9196886@qq.com
Q Q:9196886
微信二维码
