Follow

#bashFu to show count of visitors today #gopher #gemini 

#!/bin/bash

echo "Visitors to $(hostname) on $(date +%d/%b/%Y)"

HTTPV=$(grep "\[`date +%d/%b/%Y`" /var/log/nginx/access.log | cut -d" " -f1 | sort | uniq | wc -l)

GOPHERV=$(grep "\[`date +%d/%b/%Y`" /var/log/gopher | cut -d" " -f1 | sort | uniq | wc -l)

GEMINIV=$(grep "`date +'%b %d'`" /var/log/gemini.log | cut -d" " -f11 | sort | uniq | wc -l)

echo "HTTP Gopher Gemini"
echo "$HTTPV $GOPHERV $GEMINIV"

· · Web · 0 · 0 · 0
Sign in to participate in the conversation
Mastodon.Radio

Mastodon.Radio is a community space for the Amateur (Ham) Radio community. Come join us and talk radio, technology, and more!