X-Git-Url: http://gitweb.pimeys.fr/?p=scripts-20-100.git;a=blobdiff_plain;f=grepmac.sh;h=a394f87582265c34db5e6934133994acdf826111;hp=046229a6798a0f3cc40d53af703bedda7fef4f6b;hb=7e4a560133f4679b54210d674b306f58373d99d9;hpb=2d7cd8502b1d458af1c6994d6f983560aa7b6e6a diff --git a/grepmac.sh b/grepmac.sh index 046229a..a394f87 100755 --- a/grepmac.sh +++ b/grepmac.sh @@ -4,7 +4,7 @@ filename=global -# On ne va pas chercher au même endroit en fonction du serveur +# On râle si on n'est pas sur le bon serveur case `hostname` in thot) ;; @@ -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