X-Git-Url: http://gitweb.pimeys.fr/?p=scripts-20-100.git;a=blobdiff_plain;f=grepmac.sh;h=2589aeb97ffd7bff913806a7669c7bde1442e28c;hp=a394f87582265c34db5e6934133994acdf826111;hb=46fffcf99ba484ad439f82f2df5f3af8331f640c;hpb=6698cfaac70907dea8cfccf2167d3caad5b07bf7 diff --git a/grepmac.sh b/grepmac.sh index a394f87..2589aeb 100755 --- a/grepmac.sh +++ b/grepmac.sh @@ -27,6 +27,11 @@ esac # On remplace les ":" de la MAC par des "." mac=${2//:/.} +# On prévoit aussi de parser le format des switchs, tous les octets collés +macnodash=${2//:/} + +mac="(${mac}|${macnodash})" + # .log et .log.1 ne sont pas compressés echo grep -E --color -i $mac $path$filename.log grep -E --color -i $mac $path$filename.log