grep/sed/awk

awk -F '[ ;]+' '{if ($1>="'$1'" && $1<="'$3'" && $2>="'$2'" && $2<="'$4'"){print;}}' $logdir/$logfile

sed -n "/$start_day $start_time/,/$end_day $end_time/p" $logdir/$logfile > log_test1 2>&1

egrep -i 'Push|Fetch|report' log_test1 | egrep -w "$5"

awk -F '[,]' '{if(($3~/commandId/)&&($2~/307/)){print $3}}' command.log

你可能感兴趣的:(grep/sed/awk)