if echo $LOGFILENAME | grep -qE "*.gz"
then
GUNZIP="gunzip"
else
GUNZIP="grep -a \n"
fi
$LOGFILENAME是字符串
如果字符串包含.gz则 GUNZIP变量是gunzip,否则 GUNZIP是grep -a \n
if echo $LOGFILENAME | grep -qE "*.gz"
then
GUNZIP="gunzip"
else
GUNZIP="grep -a \n"
fi
$LOGFILENAME是字符串
如果字符串包含.gz则 GUNZIP变量是gunzip,否则 GUNZIP是grep -a \n