How to parse this log?

Hello. Help to parse log
Is the status log from openVPN like this. IP_addres,56924339,46404603,Thu Apr 16 07:20:32 2020
petrov.da,IP_addres,26209226,320310272,Thu Apr 16 07:48:03 2020 IP_addres,341887484,1000952454,Thu Apr 16 08:08:04 2020

Bash or regular expressions need to read the end-user for example every minute and write to a different log view 1, in a minute again to read the log and if the user is there to increase the counter by one

PS I understand that the decision can be spike, I don't know how else to account for the time users connect to the OpenVPN server.

For earlier thanks to all who replied.
April 19th 20 at 12:24
1 answer
April 19th 20 at 12:26
cut-d, -f2 111.txt
where -d isthe delimiter","
-f- column

Now on your task
1. no need to read once per minute bash supports reader mode
tail-f /var/log/syslog - this is ( gives flow)
clear all that remains Is to crop it as you need

tail-f /var/log/syslog | grep -o ""
here you'll get online all the rows about this, every man to his own
then they can count
tail-f /var/log/syslog | grep -o "" | wc-l >

but here it is better to take the whole file
cat /var/log/syslog | grep -o "" | wc-l >

well, if you need to make a list of users and their number of mentions here on another.
But not in TK ;)
Thank you! - miller commented on April 19th 20 at 12:29

Find more questions by tags Regular expressionsbash