#!/bin/bash cat /var/log/snmp-traps | sed -e "s/STRING: //g" | sed -e "s/\"//g" | sed -e "s/SNMPv2-SMI\:\:\enterprises/BLANK/g" | sed -e "s/SNMPv2-MIB::snmpTrapOID.0 = OID: BLANK.9.9.599.0.4/AuthEvent/g" | sed -e "s/BLANK.9.9.599.1.3.1.1.28.0 = /SSID=/g" | sed -e "s/BLANK.9.9.513.1.1.1.1.5.0 = /APName=/g" | sed -e "s/BLANK.9.9.599.1.3.1.1.10.0 = IpAddress: /IPAddress=/g" | sed -e "s/BLANK.9.9.599.1.3.1.1.27.0 = /Username=/g" | sed -e "s/BLANK.9.9.599.1.3.1.1.1.0 = Hex-/ClientMAC=/g" | sed -e "s/SNMPv2-MIB::snmpTrapOID.0=OID:BLANK.9.9.599.0.4/AuthEvent/g" | sed -e "s/ //g"> /var/log/snmp-traps.cleaned #Restart the trap daemon to clear log /sbin/service snmptrapd restart