#! /bin/bash
# Author: Wulinzhu
# Date & Time: 2020-07-23 14:12:38
# Description: shell
# 压缩包关键字检索,$2文件路径,$1关键字
# command: grepgz 检索关键字 被检索的压缩包文件
if [ -z $1 ] || [ -z $2 ]; then
echo "用法: grepgz [检索关键字]... PATTERN [被检索的压缩包文件]..."; exit;
fi;
zcat $2 | grep --binary-files=text $1 --color=auto