Open duoan opened 7 years ago
#!/bin/bash function scan_dir(){ for file in `ls $1` do if [ -d $1"/"$file ] then scan_dir $1"/"$file else # echo $1"/"$file gzip -dc $1"/"$file | grep -m 20 '$2' > out.log i done } scan_dir $1 $2
用于递归grep目录下的日志
用于递归grep目录下的日志