X-Git-Url: http://gitweb.pimeys.fr/?p=scripts-20-100.git;a=blobdiff_plain;f=grepmac.sh;h=a394f87582265c34db5e6934133994acdf826111;hp=b31a56cc27afa2aff544e423602ca8e2cc1d0d43;hb=7e4a560133f4679b54210d674b306f58373d99d9;hpb=207b3d996873b55a0a712d754405a2b521022b6c diff --git a/grepmac.sh b/grepmac.sh index b31a56c..a394f87 100755 --- a/grepmac.sh +++ b/grepmac.sh @@ -20,18 +20,21 @@ case $1 in --wifi) path=/var/log/wifi/ ;; + *) + echo "Préciser --filaire ou --wifi en premier paramètre." esac # On remplace les ":" de la MAC par des "." mac=${2//:/.} # .log et .log.1 ne sont pas compressés -grep --color -i $mac $path$filename.log +echo grep -E --color -i $mac $path$filename.log +grep -E --color -i $mac $path$filename.log # Les suivants sont compressés for i in `seq 1 364` do echo -n ".$i ?" read -r - zgrep --color -i $mac $path$filename.log.$i.gz + zgrep -E --color -i $mac $path$filename.log.$i.gz done