title: Count unique Ips from access.log by day and minute
body: <p>I'm wondering if it is possible to count unique IPs by minute on a specific day (Apache access.log) on Ubuntu.</p>
  <p>I already found this useful request which gives the requests per day/minute. But I unfortunatly dont make it to count the ips instead of the request lines:</p>
  <pre><code>grep &quot;06/Sep/2021&quot; access.log | cut -d[ -f2 | cut -d] -f1 |
  awk -F: '{print $2&quot;:&quot;$3}' | sort -nk1 -nk2 | uniq -c
  </code></pre>
  <p>My try is not that good:</p>
  <pre><code>grep &quot;06/Sep/2021&quot; access.log | awk '{print
  substr($4,14,5)}' | sort | uniq | while read p; do   count=`grep $p
  access.log | awk '{print $1}' | sort | uniq | wc
  -l`   echo $count $p  done
  </code></pre>
  <p>Apache Access.log:</p>
  <pre><code>11.111.111.111 - - [06/Sep/2021:01:51:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.111 - - [06/Sep/2021:01:52:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.111 - - [06/Sep/2021:01:53:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.111 - - [06/Sep/2021:01:54:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.111 - - [06/Sep/2021:01:55:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.111 - - [06/Sep/2021:01:56:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.111 - - [06/Sep/2021:01:57:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.111 - - [06/Sep/2021:01:58:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.112 - - [06/Sep/2021:01:58:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.111 - - [06/Sep/2021:01:59:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.111 - - [06/Sep/2021:02:01:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.111 - - [06/Sep/2021:02:02:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.111 - - [06/Sep/2021:02:03:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.111 - - [06/Sep/2021:02:04:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.111 - - [06/Sep/2021:02:05:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.111 - - [06/Sep/2021:02:06:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.111 - - [06/Sep/2021:02:07:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.111 - - [06/Sep/2021:02:08:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.111 - - [06/Sep/2021:02:09:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.111 - - [06/Sep/2021:02:10:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
      11.111.111.112 - - [06/Sep/2021:02:10:43 +0200] &quot;GET / HTTP/1.1&quot; 200 30783 &quot;https://website.de/&quot; &quot;Mozilla/5.0 (compatible; website; +https://www.website.de/robot.html)&quot; 2584 32146
  </code></pre>
  <p>Expected Output:</p>
  <pre><code>1 01:51
  1 01:52
  1 01:53
  1 01:54
  1 01:55
  1 01:56
  1 01:57
  2 01:58
  1 01:59
  1 02:01
  1 02:02
  1 02:03
  1 02:04
  1 02:05
  1 02:06
  1 02:07
  1 02:08
  1 02:09
  2 02:10
  </code></pre>