#!/bin/bash

log_file=./logs/access.log
ip_file=./banip.tmp
uniq_ip_file=./uniq_ip.tmp

grep -P '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' -o $log_file >$ip_file
sort $ip_file | uniq >$uniq_ip_file