shell脚本-遍历指定目录文件,找出包含指定内容的文件
脚本#!/bin/bashfor file in $1/*.hdo timespec=`strings $file | grep "struct timespec {"` if [ -n "$timespec" ]; then echo $file # echo $file: $timespec fidone执行搜索 /home/guol 下所有包含 st