mig/tools/list_new_agents.sh

9 строки
253 B
Bash

#!/usr/bin/env bash
for t in $(tail -10000 /var/log/daemon.log | grep 'is not authorized' |awk '{print $12}'|sort|uniq|sed "s/'//g")
do
if [ "$(grep $t /etc/mig/agents_whitelist.txt)" == "" ]
then
echo $t
fi
done