The following is the GNU All-permissive License as recommended in

Copyright (C) 2024 Free Software Foundation

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.

Contributions are welcome. See

Count room use

We want to search 7 daily archived logs:

ls -lh syslog.*

The command to do the counting:

cat /var/log/syslog.1|grep room=|sed 's/.*room=//;s/ .*//'|sort -u |wc -l
for x in /var/log/syslog.*gz; do zcat $x|grep room=|sed 's/.*room=//;s/ .*//'|sort -u |wc -l ; done

>>> (16 + 20 + 37 + 24 + 24 + 17 + 30) / 7