只需一步,快速开始
举报
原帖由 ATOM 于 2011-8-6 13:48 发表 干啥的?
1 #!/bin/bash 2 3 scandir=$1 4 scancode=$2 5 6 scan(){ 7 local i 8 while read i; do 9 grep -q "${scancode}" $i && echo $i 10 done < <(find ${scandir} -type f) 11 } 12 13 if [ $# != 2 ]; then 14 echo "USAGE: $0 DIR CODE" 15 echo "e.g.: $0 /var/www php" 16 exit 1 17 fi; 18 scan
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|手机版|小黑屋|全球主机交流论坛
GMT+8, 2025-1-16 10:10 , Processed in 0.060243 second(s), 7 queries , Gzip On, MemCache On.
Powered by Discuz! X3.4
© 2001-2023 Discuz! Team.