#!/bin/bash
file=$(find ‘你要找的起始位置’ -type f )
for num in $file
do
if [ -f $num ];
then
grep ‘你要查找的字符‘ $num && echo $num
fi
done
时间: 2024-11-17 07:15:16
#!/bin/bash
file=$(find ‘你要找的起始位置’ -type f )
for num in $file
do
if [ -f $num ];
then
grep ‘你要查找的字符‘ $num && echo $num
fi
done